← Loops and shapes lesson New set →

Robotics Worksheet: Loops and Shapes

Robotics lesson 22: Loops and shapes · Set 260 · 40 questions
TalentJR

Robot tip (Repeat the side): repeat n { forward s; turn right A° } drives n sides: distance = n × s. A closed regular shape needs n × A = 360°, so A = 360 ÷ n. Rectangle: repeat 2 { forward a; turn 90°; forward b; turn 90° } → perimeter 2 × (a + b), area a × b.

NameDateTime takenScore ___ / 40
  1. 1.🔁 A robot must draw a regular octagon (8 equal sides):
    repeat 8 { forward 25 cm; turn right ?° }
    What number goes in place of “?”
  2. 2.🔁 A drawing robot runs:
    repeat 3 { forward 35 cm; turn right 120° }
    Which shape does it draw?
    (a) hexagon (b) square (c) triangle (d) pentagon
  3. 3.🔁 A drawing robot runs:
    repeat 5 { forward 45 cm; turn right 72° }
    Which shape does it draw?
    (a) pentagon (b) hexagon (c) square (d) triangle
  4. 4.🔁 A drawing robot runs:
    repeat 2 { repeat 4 { forward 25 cm; turn right 90° } }
    How many cm does it drive in all?
  5. 5.🔁 A drawing robot runs:
    repeat 2 { forward 55 cm; turn right 90°; forward 45 cm; turn right 90° }
    What is the area of the rectangle it draws (in square cm)?
  6. 6.🔁 A drawing robot runs:
    repeat 3 { forward 65 cm; turn right 120° }
    How many cm does it drive in all?
  7. 7.🔁 A drawing robot runs:
    repeat 5 { forward 85 cm; turn right 72° }
    Which shape does it draw?
    (a) square (b) triangle (c) octagon (d) pentagon
  8. 8.🔁 A robot must draw a regular octagon (8 equal sides):
    repeat 8 { forward 95 cm; turn right ?° }
    What number goes in place of “?”
  9. 9.🔁 A drawing robot runs:
    repeat 5 { forward 10 cm; turn right 72° }
    How many cm does it drive in all?
  10. 10.🔁 A drawing robot runs:
    repeat 3 { forward 100 cm; turn right 120° }
    Which shape does it draw?
    (a) pentagon (b) square (c) triangle (d) octagon
  11. 11.🔁 A robot must draw a regular square (4 equal sides):
    repeat 4 { forward 25 cm; turn right ?° }
    What number goes in place of “?”
  12. 12.🔁 A drawing robot runs:
    repeat 2 { forward 25 cm; turn right 90°; forward 55 cm; turn right 90° }
    How many cm does it drive in all?
  13. 13.🔁 A drawing robot runs:
    repeat 6 { forward 95 cm; turn right 60° }
    How many cm does it drive in all?
  14. 14.🔁 A drawing robot runs:
    repeat 3 { forward 55 cm; turn right 120° }
    Which shape does it draw?
    (a) triangle (b) octagon (c) hexagon (d) pentagon
  15. 15.🔁 A drawing robot runs:
    repeat 5 { repeat 4 { forward 30 cm; turn right 90° } }
    How many cm does it drive in all?
  16. 16.🔁 A drawing robot runs:
    repeat 5 { repeat 4 { forward 5 cm; turn right 90° } }
    How many cm does it drive in all?
  17. 17.🔁 A drawing robot runs:
    repeat 8 { forward 25 cm; turn right 45° }
    How many cm does it drive in all?
  18. 18.🔁 A drawing robot runs:
    repeat 4 { repeat 4 { forward 15 cm; turn right 90° } }
    How many cm does it drive in all?
  19. 19.🔁 A drawing robot runs:
    repeat 8 { forward 10 cm; turn right 45° }
    How many cm does it drive in all?
  20. 20.🔁 A drawing robot runs:
    repeat 4 { forward 20 cm; turn right 90° }
    How many cm does it drive in all?
  21. 21.🔁 A drawing robot runs:
    repeat 8 { forward 50 cm; turn right 45° }
    Which shape does it draw?
    (a) hexagon (b) triangle (c) pentagon (d) octagon
  22. 22.🔁 A robot must draw a regular pentagon (5 equal sides):
    repeat 5 { forward 15 cm; turn right ?° }
    What number goes in place of “?”
  23. 23.🔁 A drawing robot runs:
    repeat 5 { forward 70 cm; turn right 72° }
    How many cm does it drive in all?
  24. 24.🔁 For a regular shape with n sides, each turn is … (a) 180 degrees always (b) 90 degrees always (c) 360 ÷ n degrees (d) n × 360 degrees
  25. 25.🔁 A robot must draw a regular triangle (3 equal sides):
    repeat 3 { forward 10 cm; turn right ?° }
    What number goes in place of “?”
  26. 26.🔁 A drawing robot runs:
    repeat 5 { repeat 4 { forward 15 cm; turn right 90° } }
    How many cm does it drive in all?
  27. 27.🔁 How many sides does a hexagon have? (a) 7 (b) 5 (c) 6 (d) 8
  28. 28.🔁 Why do we use a loop to draw a square? (a) to make it crash (b) the same steps repeat (c) loops are colourful (d) squares need 5 sides
  29. 29.🔁 A robot must draw a regular pentagon (5 equal sides):
    repeat 5 { forward 100 cm; turn right ?° }
    What number goes in place of “?”
  30. 30.🔁 A drawing robot runs:
    repeat 8 { forward 15 cm; turn right 45° }
    Which shape does it draw?
    (a) pentagon (b) hexagon (c) octagon (d) square
  31. 31.🔁 A drawing robot runs:
    repeat 8 { forward 15 cm; turn right 45° }
    How many cm does it drive in all?
  32. 32.🔁 A drawing robot runs:
    repeat 3 { forward 20 cm; turn right 120° }
    How many cm does it drive in all?
  33. 33.🔁 A drawing robot runs:
    repeat 8 { forward 35 cm; turn right 45° }
    How many cm does it drive in all?
  34. 34.🔁 A robot must draw a regular hexagon (6 equal sides):
    repeat 6 { forward 70 cm; turn right ?° }
    What number goes in place of “?”
  35. 35.🔁 A drawing robot runs:
    repeat 3 { forward 45 cm; turn right 120° }
    Which shape does it draw?
    (a) square (b) octagon (c) triangle (d) hexagon
  36. 36.🔁 A drawing robot runs:
    repeat 4 { forward 35 cm; turn right 90° }
    How many cm does it drive in all?
  37. 37.🔁 A robot must draw a regular triangle (3 equal sides):
    repeat 3 { forward 15 cm; turn right ?° }
    What number goes in place of “?”
  38. 38.🔁 A drawing robot runs:
    repeat 4 { forward 25 cm; turn right 90° }
    Which shape does it draw?
    (a) triangle (b) square (c) pentagon (d) octagon
  39. 39.🔁 A drawing robot runs:
    repeat 3 { forward 30 cm; turn right 120° }
    Which shape does it draw?
    (a) octagon (b) pentagon (c) triangle (d) square
  40. 40.🔁 A drawing robot runs:
    repeat 2 { forward 20 cm; turn right 90°; forward 15 cm; turn right 90° }
    What is the area of the rectangle it draws (in square cm)?

Answer key

  1. 45
  2. triangle
  3. pentagon
  4. 200
  5. 2475
  6. 195
  7. pentagon
  8. 45
  9. 50
  10. triangle
  11. 90
  12. 160
  13. 570
  14. triangle
  15. 600
  16. 100
  17. 200
  18. 240
  19. 80
  20. 80
  21. octagon
  22. 72
  23. 350
  24. 360 ÷ n degrees
  25. 120
  26. 300
  27. 6
  28. the same steps repeat
  29. 72
  30. octagon
  31. 120
  32. 60
  33. 280
  34. 60
  35. triangle
  36. 140
  37. 120
  38. square
  39. triangle
  40. 300

Free robotics lessons, practice and worksheets at talentjr.in/robotics-for-kids