Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

complete the code to draw a rectangle wider than it is high. from turtl…

Question

complete the code to draw a rectangle wider than it is high.
from turtle import *
forward()
right(90)
forward()
right(90)
forward()
right(90)
forward()
done()

Explanation:

Step1: Determine the length and width

Since the rectangle is wider than it is high, let's assume the width (longer side) is \(100\) and the height (shorter side) is \(50\).

Step2: Fill in the code

The first forward is for the width: \(forward(100)\)
The second forward is for the height: \(forward(50)\)
The third forward is for the width again: \(forward(100)\)
The fourth forward is for the height again: \(forward(50)\)

Answer:

forward(100)
forward(50)
forward(100)
forward(50)