

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 7
click for more info
Not enough gems
Cost: 6 gems
1: Arrays in Go
incomplete
2: Slices in Go
incomplete
3: Slices Review
incomplete
4: Make
incomplete
5: Len and Cap Review
incomplete
6: Variadic
incomplete
7: Append
incomplete
8: Range
incomplete
9: Slice of Slices
incomplete
10: Tricky Slices
incomplete
11: Message Filter
incomplete
12: Password Strength
incomplete
13: Message Tagger
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
As part of improving security, Textio wants to enforce a new password policy. A valid password must meet the following criteria:
A string is really just a read-only slice of bytes. This means that you can use the same techniques you learned in previous lessons to iterate over the characters of a string.
Implement the isValidPassword function by looping through each character in the password string. Make sure the password is long enough and includes at least one uppercase letter and one digit.
Assume passwords consist of ASCII characters only.
Remember that characters in Go strings are really just bytes under the hood. You can compare a character to another character like 'A' or '0' to check if it falls within a certain range.