Skip to content
← Back to Community
ATM
Profile icon
fariha_hime

There is something wrong with my code here. can someone please correct it for me?

Voters
Profile icon
ChristianCalan1
Profile icon
fariha_hime
Comments
hotnewtop
Profile icon
mcuringa

I'm not sure exactly what you're trying to do, but I looked at your code and simplified it. If you want to repeat the loop again after they take out the money (or if they enter an invalid amount) the clearest way would be to create a function. Anyway, here's a simpler version of your code. I didn't introduce anything that wasn't already in your code, so it should make sense to you:

PIN = 0 while PIN!=4411: PIN = int(input("Enter pin number:")) Amount=int(input("How much money do you want to withdraw?")) if Amount<=30000: print(Amount) else: print("Sorry, but you don't have enough funds.")
Profile icon
mcuringa
Profile icon
UndertaleRulez

where is the link?

Profile icon
timmy_i_chen

What's wrong with your code? When asking someone for help, it's usually helpful if you tell us what's supposed to happen, and what is actually happening.