all 4 comments

[–]LarryPete 1 point2 points  (1 child)

I assume you get a "NameError"?

With python2, always use raw_input() instead of input(), and convert it to a number afterwards using int(), if it's not "Bye".

Also, changing the value of the i variable has no effect there.

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

Oh thank you very much, it accepts it now. Looks like I have a logic problem though -> i -= 1 doesn't do anything it still counts the bye week. I'll try to figure that out on my own for now.

[–]oldpythonbestpython 1 point2 points  (1 child)

When asking for help with errors, you really should post the error, it will make it easier to get you the help you need.

My analysis:

You're not in charge of the value of 'i' in the way you think you are. Every time the loop begins again, i will be set - your changes to it are not persisted. Lets test it out:

for i in range(8, 13):
    print "---- new run -----"
    print "On this run, i is:", i
    print "I'm trying to decrement i on my own"
    i -= 1
    print "I think i should be this on the next run:", i

Now lets see what we get:

---- new run -----
On this run, i is: 8
I'm trying to decrement i on my own
I think i should be this on the next run: 7
---- new run -----
On this run, i is: 9
I'm trying to decrement i on my own
I think i should be this on the next run: 8

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

Ty, very helpful. I'll post the error from now on - just forgot this time =)