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.
36 lines
590 B
36 lines
590 B
package main |
|
|
|
import ( |
|
"unicode" |
|
|
|
student "student" |
|
|
|
"lib" |
|
) |
|
|
|
func isAlpha(s string) bool { |
|
for _, r := range s { |
|
if !unicode.Is(unicode.Hex_Digit, r) { |
|
return false |
|
} |
|
} |
|
return true |
|
} |
|
|
|
func main() { |
|
table := append( |
|
lib.MultRandASCII(), |
|
"Hello! €How are you?", |
|
"a", |
|
"z", |
|
"!", |
|
"HelloHowareyou", |
|
"What's this 4?", |
|
"Whatsthis4", |
|
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", |
|
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!", |
|
) |
|
for _, arg := range table { |
|
lib.Challenge("IsAlpha", student.IsAlpha, isAlpha, arg) |
|
} |
|
}
|
|
|