Advertisement
Guest User

Untitled

a guest
Oct 4th, 2015
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. 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.
  2. input("Enter your Account Number")
  3. print ("Current Account Balance: 25000")
  4.  
  5. strCHOICE = input ("Press 1 to make a Deposit or 2 to make a Withdrawal.")
  6.  
  7. if CHOICE == 1
  8. strDEPOSIT = input("Press 1 to deposit to checking, 2 for savings")
  9. if DEPOSIT = 1
  10. print("Please insert check or money now")
  11. elif DEPOSIT = 2
  12. print("Please insert check or money now")
  13.  
  14. elif CHOICE == 2
  15. strWITHDRAWAL = input("press 1 to draw funds from checking, press 2 for savings.")
  16. if WITHDRAWAL = 1
  17. input("How much would you like to withdraw today?")
  18. print("Please remove your cash from the slot below")
  19. elif WITHDRAWAL = 2
  20. input("How much would you like to withdraw today?")
  21. print("Please remove your cash from the slot below")
  22.  
  23. endofprogram = input("Thank you for your business, press enter to conclude this transaction.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement