On This Page

This set of Problem Solving and Python Programming Multiple Choice Questions & Answers (MCQs) focuses on Problem Solving And Python Programming Set 11

Q1 | Which of the following data structures is returned by the functions globals() and locals()?
Q2 | On assigning a value to a variable inside a function, it automatically becomes a global variable.
Q3 | What happens if a local variable exists with the same name as the global variable you want to access?
Q4 | print(a)
Q5 | f() x
Q6 | Which is the most appropriate definition for recursion?
Q7 | Only problems that are recursively defined can be solved using recursion.
Q8 | Which of these is false about recursion?
Q9 | ,i+j) print(test(4,7))
Q10 | 5 RECURSION
Q11 | What is tail recursion?
Q12 | , tot-2)
Q13 | Which of the following statements is false about recursion?
Q14 | Recursion and iteration are the same programming approach.
Q15 | What happens if the base condition isn’t defined in recursive programs?
Q16 | Which of these is not true about recursion?
Q17 | Which of these is not true about recursion?
Q18 | Which of the following commands will create a list?
Q19 | What is the output when we execute list(“hello”)?
Q20 | Suppose list1 is [2445,133,12454,123], what is max(list1)?
Q21 | Suppose list1 is [3, 5, 25, 1, 3], what is min(list1)?
Q22 | Suppose list1 is [1, 5, 9], what is sum(list1)?
Q23 | To shuffle the list(say list1) what function do we use?
Q24 | Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation?
Q25 | Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?