python 3.x - How can I cause my program to loop until a certain combination of values is reached? -
I want to design this program so that the user has an X (X, Y) grid, and as long as possible (x , Y) The program is not used for loop to reach values. I just have to figure out how to design a loop
question = (input ("where do you want to go?")); Y = 0x = 0 If question in ["up"]: y = y + 1 print ("You have taken one unit up!") Print ("Your position is now", X, Y) In the question ["Bottom"]: y = y - 1 print ("You have transferred one unit!") Print ("Your position is now", X, Y) if the question in ["right"]: x = x Question in ["left"]: 1 print ("You have taken the right one unit!") Print ("Your position is now", X, Y): y = y + 1 print ("You left one unit ! ") Print (" Your Status ("You can not go there.")
/ Html>
Comments
Post a Comment