Guest User

Untitled

a guest
Apr 12th, 2012
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. Write a program that requests a password and verifies that it is a valid
  2. password. To be valid the password must be at least 6 characters long and
  3. contain at least one digit.
  4.  
  5. Your program should:
  6. 1. Determine whether the password is valid. If it is not, a message telling
  7. the user what is wrong should be output
  8. 2. If it is valid, the program should thank the user for entering a valid
  9. password
  10. Once your program executes correctly, upload your file. Make sure
  11. your name is in a comment.
  12.  
  13. Sample Output (inputs in bold)
  14. Please enter a password: pass6
  15. Passwords must be at least 6 characters long
  16. Please enter a password: TarrantNW
  17. Passwords must include at least one digit (1-9)
  18. Please enter a password: Tccd03
  19. Thank you, that is a valid password
Advertisement
Add Comment
Please, Sign In to add comment