# Problems with task 1 and task 3

**URL:** <https://get-help.theconstruct.ai/t/problems-with-task-1-and-task-3/14521>\
**Category:** Python Basics For Robotics\
**Created:** [December 31, 2021, 11:25pm UTC](https://get-help.theconstruct.ai/t/problems-with-task-1-and-task-3/14521 "2021-12-31T23:25:43Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![ralves](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/ralves/32/7039_2.png) [@ralves](https://get-help.theconstruct.ai/u/ralves)\
**Post date:** [January 17, 2022, 5:09pm UTC](https://get-help.theconstruct.ai/t/problems-with-task-1-and-task-3/14521/8 "2022-01-17T17:09:30Z")

</div>

Hi @ghduarte

the possible reason why your script is failing is that what you are doing is:

- You are moving forward only when there are walls on both sides

But what you have to do is:

- Keep moving until there are no walls detected on both sides.

Your current script stops as soon as it passes the **robot’s left wall** , but the robot at this point has not yet gone through the **robot’s right wall**. Please check the expected behavior in the image below to understand what I mean here:

![task3-The-Construct-robot-leaves-wall](https://get-help.robotigniteacademy.com/uploads/default/original/2X/5/51c51275d2be4cc0e16a0f903cf219fb19ec51c1.gif)

---

_[View the full topic](https://get-help.theconstruct.ai/t/problems-with-task-1-and-task-3/14521)._
