Question: Rewrite this program, putting print statements to display the menu and the user input statement inside of a function. The function must return the choice
Rewrite this program, putting print statements to
display the menu and the user input statement inside of a function. The function must return the choice to the calling program. Write and call a second function, sending user choice as an argument. This function performs the selection IF statements.
Type in and run this code and describe what happens. Test with all valid and invalid menu choices.
This will be a building block for a future project. Points
choice #initializes variable to some number
while choice :
print
print View account balance"
print Make Deposit"
print Withdraw from account"
print Quit ATM program"
print
choice intinputPlease enter your choice."
print
if choice :
printPerforming task #
elif choice :
printPerforming task #
elif choice :
printPerforming task #
elif choice :
printExiting
else:
printInvalid choice"
print
printend of program"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
