Python Miscellaneous Read Discuss Courses Python Miscellaneous Please wait while the activity loads. If this activity does not load, try refreshing your browser. Also, this page requires javascript. Please visit using a browser with javascript enabled. If loading fails, click here to try again Question 1 What is the output of the following program : Python3 print "Hello World"[::-1] dlroW olleH Hello Worl d Error Python Miscellaneous Discuss itQuestion 1-Explanation: [::] depicts extended slicing in Python and [::-1] returns the reverse of the string. Question 2Given a function that does not return any value, what value is shown when executed at the shell?intboolvoidNonePython Miscellaneous Discuss itQuestion 2-Explanation: Python explicitly defines the None object that is returned if no value is specified.Question 3Which module in Python supports regular expressions?reregexpyregexNone of the abovePython Miscellaneous Discuss itQuestion 3-Explanation: re is a part of the standard library and can be imported using: import re.Question 4 What is the output of the following program : Python3 print 0.1 + 0.2 == 0.3 True False Machine dependent Error Python Miscellaneous Discuss itQuestion 4-Explanation: Neither of 0.1, 0.2 and 0.3 can be represented accurately in binary. The round off errors from 0.1 and 0.2 accumulate and hence there is a difference of 5.5511e-17 between (0.1 + 0.2) and 0.3. Question 5Which of the following is not a complex number?k = 2 + 3jk = complex(2, 3)k = 2 + 3lk = 2 + 3JPython Miscellaneous Discuss itQuestion 5-Explanation: l (or L) stands for long.Question 6What does ~~~~~~5 evaluate to?+5-11+11-5Python Miscellaneous Discuss itQuestion 6-Explanation: ~x is equivalent to -(x+1).Question 7Given a string s = “Welcome”, which of the following code is incorrect?print s[0]print s.lower()s[1] = ‘r’print s.strip()Python Miscellaneous Discuss itQuestion 7-Explanation: strings are immutable in PythonQuestion 8________ is a simple but incomplete version of a function.StubFunctionA function developed using bottom-up approachA function developed using top-down approachPython Miscellaneous Discuss itQuestion 9To start Python from the command prompt, use the command ______execute pythongo pythonpythonrun pythonPython Miscellaneous Discuss itQuestion 10Which of the following is correct about Python?It supports automatic garbage collection.It can be easily integrated with C, C++, COM, ActiveX, CORBA, and JavaBoth of the aboveNone of the abovePython Miscellaneous Discuss it 1 There are 10 questions to complete. You have completed questions question Your accuracy is Correct Wrong Partial-Credit You have not finished your quiz. If you leave this page, your progress will be lost. Correct Answer You Selected Not Attempted Final Score on Quiz Attempted Questions Correct Attempted Questions Wrong Questions Not Attempted Total Questions on Quiz Question Details Results Date Score Hint Time allowed minutes seconds Time used Answer Choice(s) Selected Question Text Need more practice! Keep trying! Not bad! Good work! Perfect! Last Updated : 10 Mar, 2018