# Drive and rotate in a a square  (Ultimate Goal)

hint= <https://youtu.be/T7qsSIdD1d4>&#x20;

1. the code   simple solution with variable

Scroll down for alternative program  option1

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXf-lgpagZ1whqf9Y7mla5wyaRCSkG0PToPFZ07tGjAZMALqkohsQx-pnZi8fZzCyDYRIbbPd3yG8yqcW-oi2eGQWkUn3NHbDQenJXEqq4_0xjl0vzSv_QSqLvaBRYOD1QeABjJ3fdk5scxvpGP5_LDWXlxV?key=KxOzS226JyqPxk_1PhEW2w)![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXe6GqF9zcb6bDUphh5t-YsIBODDIv7sXt2C-N5pJrO1v7rLMSrzQ02yb4geWmvD9EMFpSr4_su9382Y0ePkrbFkRUtVebfjEDw87QRxTRi-SmEH6fw8X8pE7x8kmutD7ThlJanxso2owJcGHwU6sr8AW-ug?key=KxOzS226JyqPxk_1PhEW2w)

option2-code-use Time

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdKvpBGaOjmg3C-SJvOT1kJ8DEgRfmMwkv49xLhSxjrPaZrN44gnpAPNMj_CQmnHz3dJohceYLHtDxLILbYOOjmGwAveUbO8RKemAl7q_tcJ12XpyHPYTwp0rr87W--3MaEjJ35fST7O4K9v7wo7KmEyYs?key=KxOzS226JyqPxk_1PhEW2w)

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfTSFXOTuNj3ykCMRk2Zn48OYq1coyZ-Otjk343Ma4peT_Jox8UtYRWpGRComiVfThhQt5kLQIngpv6DXEQgv6uSLaB_TDRe07w7QvS85NwP0eW7mWVBFauQj7oKyt1sFdABgDRiXcNs6Yc-TOwPC0s2kMO?key=KxOzS226JyqPxk_1PhEW2w)

2. \#4 code- no variables

Note this code isn’t perfect

an alternative code option

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcRXCg3xGYv1ddGPbA4rYtjvL0rWDPuLg9pNnMseW9fJgHBIoYDvCKPm2SvcRSCc9OE6ui4UHiNji8TcJ8h5U-qKL4y6IJar5RrmIQSHTct3JwNvqiAlB3MeKqVK4Cf1almSjlTm4p_J7R-jJ0JvDtY_U5N?key=KxOzS226JyqPxk_1PhEW2w)![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXddtWV_uEHi9l2J4HCuOSpBAegPwH-8K06lh8-uuQ-irygCfeqBwzUhdgwEVHl4F7AvNaxGlTii-LW6ZsU3pYYiFaOcWDj0MGGvc2OxvpxbEPOy9EMbPrn_szHMkS47KDf0yVhCHx9U9s54T5TFH21omA6K?key=KxOzS226JyqPxk_1PhEW2w)

&#x20;

3. \#4 code solution  <https://youtu.be/MRZdcOrLEGM>
4. alt solution  <https://youtu.be/MXjoF2XXLAE>  (includes a loop) &#x20;
