21. Which of the following is not a valid namespace?
22. In which direction is the turtle pointed by default?
23. Which of the following returns a string that represents the present working directory?
24. The output of the following two Python codes is exactly the same.
object
'a'
CODE 1
>>> pickle.dumps('a', 3)
CODE 2
>>> pickle.dumps(object, 3)
object
'a'
CODE 1
>>> pickle.dumps('a', 3)
CODE 2
>>> pickle.dumps(object, 3)25. If __getstate__() returns _______________ the __setstate__() module will not be called on pickling.
26. What will be the output of the following Python function (random module has already been imported)?
random.choice('sun')
random.choice('sun')27. What is displayed on executing print(math.fabs(-3.4))?
28. The output of both of the print statements is the same.
import datetime
dt_1 = datetime.datetime.today()
dt_2 = datetime.datetime.now()
print(dt_1)
print(dt_2)
import datetime
dt_1 = datetime.datetime.today()
dt_2 = datetime.datetime.now()
print(dt_1)
print(dt_2)29. Which of the following functions does not accept any arguments?
30. Which of the following functions can be used to make the arrow black?
Read More Section(Module in Python)
Each Section contains maximum 100 MCQs question on Module in Python. To get more questions visit other sections.
