Odpowiedź:
def route():
while True:
if left() == 1 and right() == 1 and front() != 1:
move()
elif left() != 1 and right == 1 and front() == 1:
turnL()
elif left() == 1 and right != 1 and front() == 1:
turnR()
elif left() != 1 and right != 1 and front() != 1:
break
Wyjaśnienie:
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
Odpowiedź:
def route():
while True:
if left() == 1 and right() == 1 and front() != 1:
move()
elif left() != 1 and right == 1 and front() == 1:
turnL()
move()
move()
move()
elif left() == 1 and right != 1 and front() == 1:
turnR()
move()
move()
move()
elif left() != 1 and right != 1 and front() != 1:
break
Wyjaśnienie: