Answer to Question #41431 in Python for matt

Question #41431
For try/except, there are two places in which you will receive user input. The first is in a function that displays a menu and obtains a selection from the user. The function must return the selection as an integer. Therefore, it must refuse input from the user until an integer has been typed in.

The second place an integer is required is the guess. Do not accept a guess from the user unless an integer is typed at the keyboard. That is, ask him/her to try again if they enter something other than an integer.

You'll need to use a while loop to operate the menu driven interface. There are three choices:

•0: exit
•1: guess
•2. get a new secret number
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS