May-20-2019, 09:26 AM
Hello,
I think the problem become of call input in tests. When you enter in the "if", you call input(). If it isn't the value expected, you enter in the "elif" where you call a new input().
Try:
Nicolas TATARENKO
I think the problem become of call input in tests. When you enter in the "if", you call input(). If it isn't the value expected, you enter in the "elif" where you call a new input().
Try:
posx = 0 posy = 0 doForever = True while doForever == True: value = input() if value == "forward": posy += 1 print(posy) elif value == "backward": posy -= 1 print(posy)Best Regards,
Nicolas TATARENKO