On This Page

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

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