What Will Be The Output Of The Following Python Codep Pre #908
What will be the output of the following Python code?</p> <pre><code class="language-python">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)</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Python Modules - Python Turtle Module - Quiz No.1.
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)
Error
1 square
2 squares, at a separation of100 units, joined by a straight line
2 squares, at a separation of 100 units, without a line joining them