Question: python only Write a program that simulates a simple ATM machine. The program asks the user to choose between 2 actions: - To withdraw an

 python only Write a program that simulates a simple ATM machine.

python only

Write a program that simulates a simple ATM machine. The program asks the user to choose between 2 actions: - To withdraw an amount of money, the user should enter 1. - To stop using the ATM, the user should enter 0. If the user enters any other number, the program should display the error message "Invalid choice." and ask for a choice again. If the user enters 1, the program repeatedly asks them to enter an integer, corresponding to the amount of money they want to withdraw from an ATM, until the amount is valid. The amount is valid if it is at least equal to $50 and is a multiple of 10 . If the amount is not valid, the program should check why, and output the reason to the user and ask them to enter a new amount, using the following prompts: - If the amount is less than 50: "The amount should be at least $50. Enter a new amount: " - If the amount is not a multiple of 10: "The amount should be a multiple of 10. Enter a new amount: " - If the amount is less than 50 and not a multiple of 10: "The amount should be at least $50 and be a multiple of 10. Enter a new amount:" Once the user enters a valid amount, the program outputs: Thank you. Your 5 [amount] will be delivered shortly. The program repeatedly asks the user to choose between the options, until the user enters 0 . Then, the program output: Thank you for using our ATM! Notes: - The output must be in the format shown in the examples below, including the format of the prompt, spaces, and punctuation. Be mindful of the slight difference of prompts to ask the user's choice when they are asked for the first time and after an input error, and when they are asked after a previous withdrawal. For example

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!