Question 1 of 25
Hints left: 3
Q1
What will be the output of the following Python code? import turtle t=turtle.Pen() t.goto(300,9) t.position()
Q2
What is the purpose of the from __future__ import ... statement in Python?
Q3
Which of the following functions can be used to find the protocol version of the pickle module currently being used?
Q4
Which of the following functions results in an error?
Q5
Which of the following cannot be returned by random.randrange(4)?
Q6
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)
Q7
What will be the output of the following Python code? import turtle t=turtle.Pen() t.clear() t.isvisible()
Q8
What will be the output of the following Python code? import turtle t=turtle.Pen() t.right(90) t.forward(100) t.heading()
Q9
What does random.shuffle(x) do when x = [1, 2, 3]?
Q10
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)
Q11
What will be the output of the following Python code? import sys sys.argv
Q12
What is the default base used when math.log(x) is found?
Q13
Which of these definitions correctly describes a module?
Q14
Which of the following functions does not accept any arguments?
Q15
What is returned by math.ceil(3.4)?
Q16
Which of the following isn't true about main modules?
Q17
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())
Q18
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)
Q19
What is the result of math.fsum([.1 for i in range(20)])?
Q20
What does os.name contain?
Q21
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)
Q22
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)
Q23
What is the value of x if x = math.ldexp(0.5, 1)?
Q24
Which of the following aren't defined in the math module?
Q25
Which of the following functions can be used to make the arrow black?