Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted as Python by dear ( 5 years ago )
#!/usr/bin/python3

from pyrob.api import *


@task
def task_8_28():

    if wall_is_above() and wall_is_beneath() == 1:
        while wall_is_on_the_right() == 0:

            if wall_is_above() and wall_is_beneath() == 0:
                while wall_is_above() == 0:
                    move_up()
                while wall_is_on_the_left() == 0:
                    move_left()
                return

            move_right()

        while wall_is_on_the_left() == 0:

            if wall_is_above() and wall_is_beneath() == 0:
                while wall_is_above() == 0:
                    move_up()
                while wall_is_on_the_left() == 0:
                    move_left()
                return

            move_left()
    else:
        while wall_is_above() == 0:
            move_up()
        while wall_is_on_the_left() == 0:
            move_left()
        return


if __name__ == '__main__':
    run_tasks()

 

Revise this Paste

Your Name: Code Language: