Fill in the blank such that the following Python code results in the formation of an inverted, equilateral triangle. [code]import turtle t=turtl

Fill in the blank such that the following Python code results in the formation of an inverted, equilateral triangle.
Code:
import turtle
t=turtle.Pen()
for i in range(0,3):
	t.forward(150)
	t.right(_____)
A. -60
B. 120
C. -120
D. 60
 
Answer: b
Explanation: An angle of -120 will result in the formation of an upright, equilateral triangle. An angle of 120 will result in the formation of an inverted triangle. The angles of 60 and -60 do not result in the formation of a triangle.
 

Tìm kiếm

Back
Top