diff --git a/PY4E/ch03/how_old.py b/PY4E/ch03/how_old.py new file mode 100644 index 0000000..00d034d --- /dev/null +++ b/PY4E/ch03/how_old.py @@ -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, "!") +