Question 1 of 25
Hints left: 3
Q1
Which of the following can be used to create a directory?
Q2
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)
Q3
What is the purpose of the from ... import * statement in Python?
Q4
What will be the output of the following Python code? import time time.asctime()
Q5
Lambda functions cannot be pickled because:
Q6
What is returned by math.isfinite(float('inf'))?
Q7
What is the purpose of the __init__.py file in a Python module?
Q8
What is the purpose of the import statement in Python?
Q9
What does os.link() do?
Q10
What is a namespace in Python?
Q11
Which of the following will not be returned by random.choice("1 ,")?
Q12
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())
Q13
Which of the following is not an advantage of using modules?
Q14
What will be the output of the following Python function, assuming that the random module has already been imported? random.uniform(3,4)
Q15
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)
Q16
What is the purpose of the sys.path list in Python?
Q17
The function used to alter the thickness of the pen to 'x' units:
Q18
How can you reload a module in Python?
Q19
What is the purpose of the from ... import ... statement in Python?
Q20
What does the as keyword do when used with the import statement?
Q21
How can you access a function my_function from a module my_module in Python?
Q22
What will be the output of the following code: import math print(math.pi)
Q23
What will be the output of the following code: from math import sqrt print(sqrt(16))
Q24
How can you determine the path of the currently executing script in Python?
Q25
What will be the output of the following Python code? import turtle t=turtle.Pen() t.resizemode(“examveda”) t.resizemode()