Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Let's make the result of division by
0
42
so that it's defined as well...I like this better. You just forgot the '=' in '>='
I like this solution, but it seems hardly worth the effort of writing a function. Nice work!
That just creates a string that repeats
string
n
times. Nothing more to it.This comment is hidden because it contains spoiler information about the solution
A more Swift name would be:
or you could use a method on String
So you are saying, dont name variables, that are within a def, important names that have other uses? Example dont create a variable named Str, Int, Float etc
These functions are against Swift naming conventions.
func repeatStr(_ string: String, _ n: Int) -> String
. Global functions, the termStr
, blank external labels andn
as an internal label are all against Swift naming guidelines.