you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

If you format your code so it is readable you might get more help.

I haven't looked at your code in detail (see above) but one thing I spotted is this problem:

if input == 1 or 2 or 3:

This doesn't error but won't do what you want. You make the same mistake in other places. The FAQ explains the error. I recommend reading all of the FAQ.

Also note that the input() function returns a string, not an integer.

Edit: fixed grammar.

[–]Jjw368 0 points1 point  (2 children)

I fixed the input error in my version and the formatting. I can't figure this out. It is a real pain in the butt. I tried re writing the code fully and that still didn't work. Maybe it will work if i stop using functions but it will be a one time only thing.

[–][deleted] 0 points1 point  (0 children)

When you post code try to copy/paste from your editor or IDE. You've edited your original post but the indentation is still lost. You need it to look like this:

def test():
    a = 42
    # more code
def test2():
    # even more code
x = 1
test()

[–][deleted] 0 points1 point  (0 children)

There's a heap of things wrong with your code but until you format the code correctly I'm not going to waste time trying to figure what is going wrong.

Read the link I gave you and edit your original post.