Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uname = "TIP123"
- pword = "1234"
- count = 0
- while count < 3:
- username = input("Enter username: ")
- password = input("Enter password: ")
- if username == uname and password == pword:
- running = True
- print("You entered a correct username and password. Press any Key to proceed to Main Menu")
- input()
- break
- else:
- count = count + 1
- print("INVALID PASSWORD!\n Try Again.")
- if count == 3:
- running = False
- balance = 1000
- while running:
- print("\n\nMenu:")
- print("A. Check Account")
- print("B. Deposit Money")
- print("C. Withdraw Money")
- print("D. Exit")
- choice = input("Enter your choice: ")
- if choice == "A" or choice == "a" :
- print("Your account balance is: " + str(balance))
- continue
- elif choice == "B" or choice == "b" :
- deposit = int(input("Enter your money to deposit: "))
- if deposit > 0 :
- balance = balance + deposit
- print("Deposit successful")
- continue
- else :
- print("Invalid Value!")
- elif choice == "C" or choice == "c" :
- widthraw = int(input("Enter your money to widthraw: "))
- if widthraw < balance and widthraw < 1000 :
- balance = balance - widthraw
- print("Widthrawal successful")
- continue
- else :
- print("Widthrawal Amount must be less than the current balance and 1000")
- continue
- elif choice == "D" or choice == "d" :
- running = False
- continue
- else :
- print("\nDo not be afraid. Take the challenge!")
- continue
- print("Thank you for using the machine...")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement