Question 1 of 25
Hints left: 3
Q1
What will be the output of the following Python code? pickle.HIGHEST_PROTOCOL
Q2
Pick the correct statement regarding pickle and marshal modules.
Q3
What will be the output of the following Python code? >>> -float('inf') + float('inf')
Q4
What will be the output of print(math.copysign(3, -1))?
Q5
What will be the output shape of the following Python code? import turtle t=turtle.Pen() for i in range(0,6): t.forward(100) t.left(60)
Q6
How can you access a variable my_variable from a module my_module in Python?
Q7
What is the purpose of the __name__ variable in a Python module?
Q8
What is the purpose of the __doc__ attribute in a Python module?
Q9
What is math.factorial(4.0)?
Q10
Program code making use of a given module is called a . . . . . . . . of the module.
Q11
What is the range of values that random.random() can return?
Q12
What will be the output of the following Python code? import turtle t=turtle.Pen t.tilt(75) t.forward(100)
Q13
The output of the following Python code is either 1 or 2. import random random.randint(1,2)
Q14
What will be the output shape of the following Python code? import turtle t=turtle.Pen() for i in range(1,4): t.forward(60) t.left(90)
Q15
All modular designs are because of a top-down design process.
Q16
To sterilize an object hierarchy, the . . . . . . . . function must be called. To desterilize a data stream, the . . . . . . . . function must be called.
Q17
What is output of print(math.pow(3, 2))?
Q18
What will be the output of the following Python code? import turtle t=turtle.Pen() for i in range(0,5): t.left(144) t.forward(100)
Q19
The randrange function returns only an integer value.
Q20
What will be the output of the following Python code? import turtle t=turtle.Pen() t.color(1,1,1) t.begin_fill() for i in range(0,3): t.forward(100) t.right(120) t.end_fill()
Q21
The value returned when we use the function isoweekday() is . . . . . . . . and that for the function weekday() is . . . . . . . . if the system date is 19th June, 2017 (Monday).
Q22
What is returned by math.expm1(p)?
Q23
Which of the following functions returns a value in degrees, counterclockwise from the horizontal right?
Q24
What will be the output of the following Python code, if the time module has already been imported? def num(m): t1 = time.time() for i in range(0,m): print(i) t2 = time.time() print(str(t2-t1)) num(3)
Q25
What does os.fchmod(fd, mode) do?