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