Ask Your Question

Revision history [back]

Can you tell us which error you got (I did not get one for a long time, then i stopped the loop) ?

Moreover, in the first pass through the loop (x = 1, p = 2), c get the value False, and it will never become True again, because it is not reset in the loop. So, your code will not print anything !

Also, instead of writing:

if c==True:

you can simply write:

if c:

because c is a boolean, which has value True or False.

Also, you can remove:

else:
    pass