Question: Ask the user to input a number. If the user's input can be cast to an integer, print the integer. If it cannot, print a
Ask the user to input a number. If the user's input can be cast to an integer, print the integer. If it cannot, print a message that the input cannot be cast to an integer. Loop until valid input is given. [Hint: use a try/except block and a while loop.] Can someone help me do this, in Python? Thank you so much.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
