FoxTrot by Bill Amend for February 07, 1996

  1. Tijaro  1
    Tijaro  almost 5 years ago

    bank simulator:

    balance = 1000

    choice = input("Deposit or Withdrawal? ")

    if (choice == “deposit” or choice == “d”): amount = int(input("Enter amount: “)) print (”Final balance: " + str(balance + amount))

    elif (choice == “withdrawal” or choice == “w”): amount = int(input("Enter amount: " )) if (amount > balance): print (“You cannot have a negative balance!”) else: print ("Final balance: " + str(balance – amount))else: print (“Invalid transaction.”)(this is python 3.6)

     •  Reply
  2. Screenshot 2023 04 20 10.48.14
    Captain Price  almost 3 years ago

    I’m wondering why he even needs those

     •  Reply
Sign in to comment

More From FoxTrot