dimanche 1 mai 2016

if statement handling-manipulation

well, ive been wondering if such thing is possible in python

while True:
    if True:
        x = -5
        x = 5

now i mean, whenever if statement is true,(in this example) the first time x to equal -5 and the second time is true, x to equal 5 ,and again the same

i know it sounds absurd but im trying to make a game which the ball has to go rightward and when returns leftward,and this thing over and over again

sorry for my bad english but it's really difficult for me to explain this

thanks in advance

Aucun commentaire:

Enregistrer un commentaire