Vidyalelo
Python · Q111

Module in Python

Programming · Python · question 111

Q111

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)

A.
Error
B.
1 square
Answer
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

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board