As for phyton right to return bool values?

Good day!
Please help with the operator bool and return
There is a task to reach a conditional on the cell wall field, but at what distance is unknown. To help you to have such a function as wall_is_on_the_right(), which returns either True or False.
But as the function to feed the loop, so he knew that is not present False, it is necessary to repeat the cycle?
Below the code body of the function, which I wrote and which does not work, and even below the job
#!/usr/bin/python3

from pyrob.api import *


@task
def task_3_1():
 n = 1
 for i in range (n):
 move_right ()
wall_is_on_the_right()
 x = wall_is_on_the_right()
 if x==False:
 n += 1
else:
break



if __name__ == '__main__':
 run_tasks()

5e13a159ab165858308074.png5e13a160ee4c1050075785.png
If anything, the job itself is here cs.mipt.ru/python/lessons/lab1.html task_3_1
April 4th 20 at 00:59
1 answer
April 4th 20 at 01:01
Solution
Let's see how the while loop
while wall_is_on_the_right():
move_right()
 ...

Find more questions by tags Python