dimanche 4 janvier 2015

Is there a way to let Python generate multiple if statements?

I just need to add +30 to every number in every if statement. I need 36 of these, is there a way to let turtle make more if statements or something similar? I'm really stuck and the manual way would be crazy.


For example:



if 0 <= x <=30 and 0 <= y <= 30:

if 30 <= x <=60 and 0 <= y <= 60:

etc.

Aucun commentaire:

Enregistrer un commentaire