if you do
To test if this string is a number with int(),you might look into try / except / finally clauses.
This way you program will not crash when int() fails.
(But there are many other ways)
Paul
input('What is your age? ')You will get a string.
To test if this string is a number with int(),you might look into try / except / finally clauses.
This way you program will not crash when int() fails.
(But there are many other ways)
Paul