Question 1 of 25
Hints left: 3
Q1
What the does random.seed(3) return?
Q2
What will be the output of the following Python code, if the sys module has already been imported? sys.stdout.write("hello world")
Q3
How can you prevent a module from executing code when imported?
Q4
Is the output of the function abs() the same as that of the function math.fabs()?
Q5
Which of the following can be used to create a symbolic link?
Q6
What will be the output of the following Python code? import sys eval(sys.stdin.readline()) Computer
Q7
Which of the following functions raises an error when an unpicklable object is encountered by Pickler?
Q8
To obtain a list of all the functions defined under sys module, which of the following functions can be used?
Q9
What will be the output of the following Python code? import random random.choice([10.4, 56.99, 76])
Q10
What will be the output of the following Python code? import turtle t=turtle.Pen() t.color(0,1,0) t.begin_fill() for i in range(0,4): t.forward(100) t.right(90)
Q11
What is the value returned by math.floor(3.4)?
Q12
The process of pickling in Python includes:
Q13
The number of lines drawn in each case, assuming that the turtle module has been imported: Case 1: for i in range(0,10): turtle.forward(100) turtle.left(90) Case 2: for i in range(1,10): turtle.forward(100) turtle.left(90)
Q14
What does os.getlogin() return?
Q15
What will be the output of the following Python code? import turtle() t=turtle.Pen() t.goto(50,60) t1=t.clone() t1.ycor()
Q16
What will be the output of the following Python code? import sys eval(sys.stdin.readline()) "India"
Q17
What does print(os.geteuid()) print?
Q18
What is the value returned by math.fact(6)?
Q19
What is returned by math.modf(1.0)?
Q20
Which of the statements about modules is false?
Q21
What will be the output of the following Python code? random.randrange(0,91,5)
Q22
In top-down design every module is broken into same number of submodules.
Q23
What will be the output of the following code: import datetime print(datetime.date.today())
Q24
What will be the output of the following Python code? print(math.isinf(float('-inf')))
Q25
What will be the output of the following Python function if the random module has already been imported? random.randint(3.5,7)