Created
June 27, 2018 06:47
-
-
Save magusafr/bc4deaddddca447a73e41554b694cded to your computer and use it in GitHub Desktop.
Input password
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while True: | |
print('Enter your age:') | |
age = input() | |
if age.isdecimal(): | |
break | |
print('Please enter a number for your age.') | |
while True: | |
print('Select a new password (letters and numbers only):') | |
password = input() | |
if password.isalnum(): | |
break | |
print('Passwords can only have letters and numbers.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment