Explore topic-wise MCQs in Python.

This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your Python knowledge and support exam preparation. Choose a topic below to get started.

1.

What will be the output of the following Python functions?

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 lineView Answer
Answer» D. Two separate triangles, not connected by a lineView Answer
2.

Fill in the blank such that the following Python code results in the formation of an inverted, equilateral triangle.

A. -60
B. 120
C. -120
D. 60View Answer
Answer» C. -120
3.

The command which helps us to reset the pen (turtle):

A. turtle.reset
B. turtle.penreset
C. turtle.penreset()
D. turtle.reset()
E. :a) turtle.resetb) turtle.penresetc) turtle.penreset()d) turtle.reset()
Answer» E. :a) turtle.resetb) turtle.penresetc) turtle.penreset()d) turtle.reset()
4.

The number of lines drawn in each case, assuming that the turtle module has been imported:

A. 10, 9
B. 9, 10
C. 9, 9
D. 10, 10View Answer
Answer» B. 9, 10
5.

What will be the output shape of the following Python code?

A. square
B. rectangle
C. triangle
D. kiteView Answer
Answer» D. kiteView Answer