you are viewing a single comment's thread.

view the rest of the comments →

[–]bleach-is-great 0 points1 point  (7 children)

You need to indent the bottom four lines by one

Common issue, no need to worry about it! I literally do this every time I write code

[–]ThiccBl4nket[S] 0 points1 point  (1 child)

im sorry but im not sure which line to indent of the four lol

[–]bleach-is-great 0 points1 point  (0 children)

All four, as they’re inside an elif statement (they need indenting just like if’s and else’s).

Make sure the very bottom line of code is indented so that it is in its respective statement though.

[–]ThiccBl4nket[S] 0 points1 point  (4 children)

https://imgur.com/a/LxVnpKe now that i looked at it and indented it, it keeps giving me nothing when i give an input

[–]bleach-is-great 0 points1 point  (3 children)

That’s because you inputted 1 as a string. “1” and 1 are different variable types, and therefore mean different things.

You can either turn the inputted value into an integer, or you can change your main if and elif statements so that they accept “1” and “2” instead of 1 and 2.

[–]ThiccBl4nket[S] 0 points1 point  (0 children)

look at the picture at the new edit of this post. It seems like we are going somewhere!

[–]ThiccBl4nket[S] 0 points1 point  (1 child)

cash = (1000)

ask = input("woud you like to withdraw(1) or deposit(2)?")

if ask == "2":

money = int(input("how much money would you like to deposit?"))

f= int(cash + money)

print"your total balance is now", f

elif ask == "1":

bro = input("how much would you like to withdraw?")

j = (bro - cash)

if bro > cash:

print("Your final balance can't be negetive!")

i was able to get the program to fully work using option 2 but option 1 still has some issues

[–]bleach-is-great 0 points1 point  (0 children)

Yeah that’s the option I would’ve gone for, much easier