account balance
I am trying to get my script to print like this:What would you like to do?
How much would you like to deposit today?
Deposit was $200, current balance is $700.25
but i keep getting an error with my script?import sys
#account balance
account_balance = float(500.25)
#defines balance
def acc_balance():
#print the beggining balance amount
print(“Your current balance:n$%.2f”%account_balance)
return account_balance
#defines deposit
#def deposit_amount():
#req user to input amt of depsit
userchoice = input(“What would you like to do?n”)
if userchoice == ‘B’:
print(“Your current balance:”)
print (account_balance)
account_balance = “nBegining Balance: “+str(account_balance)
elif userchoice ==’D’:
deposit_amount=float(input(“How much would you like to deposit today?n”))
account_balance = “Deposit Amount: “+str(deposit_amount)
print(“Deposit amount was $%.2f, current balance is $%.2f”%(deposit_amount)
#print(“Your current balance: n%.2f” % account_balance)– if i allow this to run in the script i get File “ATM.py”, line 22
print(“Your current balance: n%.2f” % account_balance)
^
SyntaxError: invalid syntax– i have been trying for hours to get this to work but obviously i am missing something. H E L P please
"Looking for a Similar Assignment? Order now and Get 10% Discount! Use Code "Newclient"
