What will be the output of the following Python code?
import turtle
t=turtle.Pen()
for i in range(0,4):
t.forward(100)
t.left(90)
t.penup()
t.left(90)
t.forward(200)
for i in range(0,4):
t.forward(100)
t.left(90)
import turtle
t=turtle.Pen()
for i in range(0,4):
t.forward(100)
t.left(90)
t.penup()
t.left(90)
t.forward(200)
for i in range(0,4):
t.forward(100)
t.left(90)A. Error
B. 1 square
C. 2 squares, at a separation of100 units, joined by a straight line
D. 2 squares, at a separation of 100 units, without a line joining them
Answer: Option B

Join The Discussion