Explanation: the variable inside a function is called as local variable and the variable definition is confined only to that function.
Problem Solving and Python Programming MCQs | Page - 22
Dear candidates you will find MCQ questions of Problem Solving and Python Programming here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Explanation: the values given during function call is taken into consideration, that is, i=2 and j=1.
Explanation: the parameter two is a variable parameter and consists of (2,3,4). hence the data type is tuple.
Explanation: a function can exist without a return statement and returns none if the function doesn’t have a return statement.
Explanation: b combines the remaining parameters into a dictionary.
Explanation: it is a list of strings.
Explanation: the first argument is the name of the program itself. therefore the length of sys.argv is one more than the number arguments.
Explanation: zero keyword arguments may be passed if all the arguments have default values.
Explanation: when a list is a default value, the same list will be reused.
Explanation: min returns the minimum element in the list.
Jump to