Add how_old.py example for chapter 3

August-report
Jeffrey Elkner 2 years ago
parent c2ecd85afd
commit 7691e18a5a

@ -0,0 +1,8 @@
age = input("How old are you? ")
while not age.isnumeric():
age = input("Please enter only digits. Try again. How old are you? ")
age = int(age)
print("Great, your are", age, "years old. Next year you'll be", age+1, "!")
Loading…
Cancel
Save