Question
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 of 100 units, joined by a straight line
d.
2 squares, at a separation of 100 units, without a line joining them
Posted under Python
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of the following code?
Similar Questions
Discover Related MCQs
Q. The output of the function len(sys.argv) is ____________
View solution
Q. To obtain a list of all the functions defined under sys module, which of the following functions can be used?
View solution
Q. The randrange function returns only an integer value. State whether true or false.
View solution
Q. Both the functions randint and uniform accept ____________ parameters.
View solution
Q. What is the interval of the value generated by the function random.random(), assuming that the random module has already been imported?
View solution
Q. Which of the following functions helps us to randomize the items of a list?
View solution
Q. The sleep function (under the time module) is used to:
View solution
Q. Which of the following functions can be used to find the coordinated universal time, assuming that the datetime module has already been imported?
View solution
Q. What is the order of namespaces in which Python looks for an identifier?
View solution
Q. Which of the statements about modules is false?
View solution
Q. Which of the following is false about “from-import” form of import?
View solution
Q. Which of the following is false about “import modulename” form of import?
View solution
Q. Which of the following is not a valid namespace?
View solution
Q. Which of the following isn’t true about main modules?
View solution
Q. All modular designs are because of a top-down design process? True or False?
View solution
Q. Which of the following functions can be used to find the protocol version of the pickle module currently being used?
View solution
Q. Which of the codes shown below will result in an error?
Given that:
object = ‘a’
View solution
Q. What is the output of the line of code shown below?
pickle.HIGHEST_PROTOCOL
View solution
Q. Pick the correct statement regarding pickle and marshal modules.
View solution
Q. To sterilize an object hierarchy, the _____________ function must be called.
To desterilize a data stream, the ______________ function must be called.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Python? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!