I am trying to figure out what I am missing to get this to work.
I am not sure how to get the account balance to change as the user continues to do more transactions. Here is the code I've written so far but now I'm stuck.
import math
def getInput():
account number = input(“Enter your account number:”)
x= 100.11
print("Account Balance is: x")
print(“\nEnter your choice of task.”)
nextTask = input(“D to make a deposit:, ”\
“W to make a withdraw: ”)
ammount = float(input("Enter ammount:")
return nextTask
def doDeposit(add):
deposit = x+ammount
print(”\nYour new balance is:”, deposit)
def doWithdraw(subtract):
withdraw = x-ammount
print(”\nYour new balance is:”, withdaw)
def inOut(x):
x = (x+deposit, ”\
x-withdraw);
return x
def main():
print(“Do you want another transaction?”)
more = input(“Enter Y or N: ”)
while(more == “Y”) or (more == “y”):
#more money to process
taskToDo = getInput( )
if taskToDo == “D”: #compute deposit
doDeposit(add)
else: #compute withdraw
doWithdraw(subtract)
print(“Do you want another transaction?”)
more = input(“Enter Y or N: ”)
#program starts here
main()
#finish up
input(“\n\nPress the Enter key to exit”)