For the 1st problem, use the lenght function.
2nd, check the string character by character until
A) You find a non digit (correct)
B) The string ends (Incorrect password, all digits)
(You must compare the ASCII codes)
3rd. Same thing, but check the entire string for a space.
Remember you need to enclose your code in quote tags.