mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
576 B
27 lines
576 B
package main |
|
|
|
import ( |
|
"github.com/01-edu/z01" |
|
|
|
solutions "./solutions" |
|
student "./student" |
|
) |
|
|
|
func main() { |
|
seps := []string{" ", "-", " ,", "_", "SPC", " . "} |
|
|
|
args := [][]string{ |
|
{"hello", "how", "are", "you", "doing"}, |
|
{"fine", "and", "you"}, |
|
{"I'm", "O.K."}, |
|
} |
|
|
|
for i := 0; i < 5; i++ { |
|
// random position for the slice of arguments |
|
posA := z01.RandIntBetween(0, len(args)-1) |
|
// random position for the slice of separators |
|
posS := z01.RandIntBetween(0, len(seps)-1) |
|
|
|
z01.Challenge("Join", student.Join, solutions.Join, args[posA], seps[posS]) |
|
} |
|
}
|
|
|