Question 1 of 25
Hints left: 3
Q1
What will be the output of the following Python code? import turtle t=turtle.Pen() t.right(90) t.forward(100) t.heading()
Q2
Which of the following functions can be used to find the protocol version of the pickle module currently being used?
Q3
Which of the following functions does not accept any arguments?
Q4
Which of the following aren't defined in the math module?
Q5
The output of both of the print statements is the same. import datetime dt_1 = datetime.datetime.today() dt_2 = datetime.datetime.now() print(dt_1) print(dt_2)
Q6
What does os.name contain?
Q7
What will be the output of the following Python code? import turtle t=turtle.Pen() t.goto(300,9) t.position()
Q8
What is the result of math.fsum([.1 for i in range(20)])?
Q9
What will be the output of the following Python code? import turtle t=turtle.Pen() t.clear() t.isvisible()
Q10
What is the value of x if x = math.ldexp(0.5, 1)?
Q11
Which of the following cannot be returned by random.randrange(4)?
Q12
Which of these definitions correctly describes a module?
Q13
What is returned by math.ceil(3.4)?
Q14
Which of the following functions results in an error?
Q15
The output of the following Python code is similar to the alphabet . . . . . . . . import turtle t=turtle.Pen() t1=turtle.Pen() t2=turtle.Pen() t.forward(100) t1.forward(100) t2.forward(100) t1.left(90) t1.forward(75) t2.right(90) t2.forward(75)
Q16
What will be the output of the following Python code? import sys sys.argv
Q17
What is the default base used when math.log(x) is found?
Q18
What will be the output of the following Python functions? import turtle t=turtle.Pen() for i in range(0,3): t.forward(100) t.left(120) t.back(100) for i in range(0,3): t.forward(100) t.left(120)
Q19
Which of the following isn't true about main modules?
Q20
What is the purpose of the from __future__ import ... statement in Python?
Q21
What will be the output shape of the following Python code? import turtle t=turtle.Pen() for i in range(0,4): t.forward(100) t.left(120)
Q22
Which of the following functions can be used to make the arrow black?
Q23
What will be the output of the following Python code if the system date is 21st June, 2017 (Wednesday)? tday=datetime.date.today() print(tday.isoweekday())
Q24
What will be the output of the following Python code? import turtle t=turtle.Pen() t.position() (100.00,0.00) t.goto(100,100) t.distance(100,0)
Q25
What does random.shuffle(x) do when x = [1, 2, 3]?