11. 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)12. Which of the following is the same as math.exp(p)?
13. The output of the following Python code will result in a shape similar to the alphabet . . . . . . . .
import turtle
t=turtle.Turtle()
t1=turtle.Turtle()
t.left(45)
t1.left(135)
t.forward(100)
t1.forward(100)
import turtle
t=turtle.Turtle()
t1=turtle.Turtle()
t.left(45)
t1.left(135)
t.forward(100)
t1.forward(100)14. What will be the output of the following Python code if the system date is 18th June, 2017 (Sunday)?
import datetime
tday=datetime.date.today()
print(tday)
import datetime
tday=datetime.date.today()
print(tday)15. What will be the output of the following Python code?
import time
for i in range(0,5):
print(i)
time.sleep(2)
import time
for i in range(0,5):
print(i)
time.sleep(2)16. What does the dir() function in Python do?
17. What will be the output of the following Python code?
import time
t=(2010, 9, 20, 8, 15, 12, 6)
time.asctime(t)
import time
t=(2010, 9, 20, 8, 15, 12, 6)
time.asctime(t)18. What does math.sqrt(X, Y) do?
19. How can you create a Python package?
20. What will be the output of the following Python code?
import turtle
t=turtle.Pen()
t.forward(100)
t.left(90)
t.clear()
t.position()
import turtle
t=turtle.Pen()
t.forward(100)
t.left(90)
t.clear()
t.position()Read More Section(Module in Python)
Each Section contains maximum 100 MCQs question on Module in Python. To get more questions visit other sections.
