Question 1 of 25
Hints left: 3
Q1
What will be the output of the following code: from math import sqrt print(sqrt(16))
Q2
What is the purpose of the from ... import ... statement in Python?
Q3
Which of the following is not an advantage of using modules?
Q4
What is returned by math.isfinite(float('inf'))?
Q5
What is the purpose of the sys.path list in Python?
Q6
What will be the output of the following code: import math print(math.pi)
Q7
The function used to alter the thickness of the pen to 'x' units:
Q8
What will be the output of the following Python code? import turtle t=turtle.Pen() t.resizemode(“examveda”) t.resizemode()
Q9
What will be the output of the following Python code? import time t=(2010, 9, 20, 8, 45, 12, 6, 0, 0) time.asctime(t)
Q10
What does os.link() do?
Q11
What does the as keyword do when used with the import statement?
Q12
How can you determine the path of the currently executing script in Python?
Q13
What will be the output if we try to extract only the year from the following Python code? (time.struct_time(tm_year=2017, tm_mon=6, tm_mday=25, tm_hour=18, tm_min=26, tm_sec=6, tm_wday=6, tm_yday=176, tm_isdst=0)) import time t=time.localtime() print(t)
Q14
How can you reload a module in Python?
Q15
Which of the following can be used to create a directory?
Q16
How can you access a function my_function from a module my_module in Python?
Q17
What is a namespace in Python?
Q18
What is the purpose of the __init__.py file in a Python module?
Q19
Lambda functions cannot be pickled because:
Q20
What is the purpose of the from ... import * statement in Python?
Q21
Which of the following will not be returned by random.choice("1 ,")?
Q22
What will be the output of the following Python code if the system date is 18th June, 2017 (Sunday)? tday=datetime.date.today() print(tday.weekday())
Q23
What will be the output of the following Python code? import time time.asctime()
Q24
What is the purpose of the import statement in Python?
Q25
What will be the output of the following Python function, assuming that the random module has already been imported? random.uniform(3,4)