169,179 views
21 votes
21 votes
Anybody know how to code?

Use an algorithm to help the Python Turtle get to the finish line in 10 steps by using only the 3 commands below:
- Turn Left
- Turn Right
- Move #












Answer:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

Anybody know how to code? Use an algorithm to help the Python Turtle get to the finish-example-1
User Laird
by
3.8k points

1 Answer

7 votes
7 votes

▪︎An onscreen camera for drawing virtual images is called "turtle" in python language.


\hookrightarrowThe codes we will be using in the following algorithm are :

▪︎Turtle.left

▪︎Turtle.right

▪︎Turtle.move #upward


\hookrightarrow An algorithm to help the python turtle reach the finish line :

  1. Turtle.left
  2. Turtle.left
  3. Turtle.left
  4. Turtle.move#upward
  5. Turtle.move#upward
  6. Turtle.move#upward
  7. Turtle.right
  8. Turtle.right
  9. Turtle.move#upward
  10. Turtle.left
User Eric Baldwin
by
3.3k points