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

from pyrob.api import *

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

if __name__ == '__main__':

If anything, the job itself is here task_3_1
April 4th 20 at 00:59
1 answer
April 4th 20 at 01:01
Let's see how the while loop
while wall_is_on_the_right():

Find more questions by tags Python