# Have you visited the ATM with your parents? What does an ATM machine do?
# Let's build a program that works like an ATM machine
''' Task 1: ATM Machine '''
print("**** Task 1: ****")
print()
# Write a program that has 4 menu options:
# 1. Deposit
# 2. Withdraw
# 3. Balance
# 4. Quit
# In the start of the program set a value for the balance.
# You must ensure that when withdrawing the amount is not greater than the balance
# If Deposit or Withdraw options are chosen, remember to display the balance after the actions are performed.
print("Welcome to the ATM!")
balance = int(input("\nWhat is your account balance?"))
choice = int(input("\nWhat do you want to do today?\n1-Deposit\n2-Withdraw\n3-Balance\n4-Quit"))
if choice == 1:
amount = int(input("\nHow much do you want to deposit?"))
balance = amount + balance
print(f"\nThank you! Your account balance is now {balance}")
elif choice == 2:
amount = int(input("\nHow much do you want to withdraw?"))
if amount<balance:
balance = balance - amount
print(f"\nYour money has been withdrawed and your balance is now {balance}")
else:
print("\nSorry that is not possible.")
elif choice == 3:
print(f"\nThank you! Your account balance is now {balance}")
else:
print("\nThank you. Bye!")
'''You have the concept of variables and if -elif statements in building a real time application, an ATM Machine'''
To embed this project on your website, copy the following code and paste it into your website's HTML: