Question 1 of 25
Hints left: 3
Q1
Which of the following cannot be pickled?
Q2
What will be the output of the following Python code? import sys sys.argv[0]
Q3
Which of the following is not a valid namespace?
Q4
Both the functions randint and uniform accept . . . . . . . . parameters.
Q5
The command which helps us to reset the pen (turtle):
Q6
Which of the following returns a string that represents the present working directory?
Q7
What is displayed on executing print(math.fabs(-3.4))?
Q8
What will be the output of the following Python code? random.seed(3) random.randint(1,5) 2 random.seed(3) random.randint(1,5)
Q9
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)
Q10
What will be the output of the following Python code? import time t=(2010, 9, 20, 8, 15, 12, 6) time.asctime(t)
Q11
What does the dir() function in Python do?
Q12
The output of the following two Python codes is exactly the same. object 'a' CODE 1 >>> pickle.dumps('a', 3) CODE 2 >>> pickle.dumps(object, 3)
Q13
In which direction is the turtle pointed by default?
Q14
What is the purpose of the __file__ attribute in a Python module?
Q15
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)
Q16
What will be the output of the following Python code? import time for i in range(0,5): print(i) time.sleep(2)
-
A
-
B
-
C
-
D
Q17
What will be the output of the following code: from math import ceil print(ceil(4.3))
Q18
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()
Q19
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)
Q20
Which of the following is the same as math.exp(p)?
Q21
What does math.sqrt(X, Y) do?
Q22
How can you create a Python package?
Q23
What is the result of sum([.1 for i in range(20)])?
Q24
If __getstate__() returns _______________ the __setstate__() module will not be called on pickling.
Q25
What will be the output of the following Python function (random module has already been imported)? random.choice('sun')