What will be the output of the following Python functions? [code]import turtle t=turtle.Pen() for i in range(0,3): t.forward(100) t.left(120)

Kim Trang

New member
What will be the output of the following Python functions?
Code:
import turtle
t=turtle.Pen()
for i in range(0,3):
	t.forward(100)
	t.left(120)
t.back(100)
for i in range(0,3):
	t.forward(100)
	t.left(120)
A. Error
B. Two triangles, joined by a straight line
C. Two triangles, joined at one vertex
D. Two separate triangles, not connected by a line
 

Tìm kiếm

Back
Top