Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Python Programming: Write a simple ATM program. Ask the user to enter their account number, and then print their beginning balance. (Just make one up). Then ask them if they want to make a deposit or a withdrawal. Depending on their selection, call a function to perform the action that they wish. Then print the new balance. They should be able to do as many transactions as they wish, so use iteration here.
- input("Enter your Account Number")
- print ("Current Account Balance: 25000")
- strCHOICE = input ("Press 1 to make a Deposit or 2 to make a Withdrawal.")
- if CHOICE == 1
- strDEPOSIT = input("Press 1 to deposit to checking, 2 for savings")
- if DEPOSIT = 1
- print("Please insert check or money now")
- elif DEPOSIT = 2
- print("Please insert check or money now")
- elif CHOICE == 2
- strWITHDRAWAL = input("press 1 to draw funds from checking, press 2 for savings.")
- if WITHDRAWAL = 1
- input("How much would you like to withdraw today?")
- print("Please remove your cash from the slot below")
- elif WITHDRAWAL = 2
- input("How much would you like to withdraw today?")
- print("Please remove your cash from the slot below")
- endofprogram = input("Thank you for your business, press enter to conclude this transaction.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement