Recursion in Python Class 12 Questions and Answers

Teachers and Examiners (CBSESkillEduction) collaborated to create the Recursion in Python Class 12 Questions and Answers. All the important Information are taken from the NCERT Textbook Computer Science (083) class 12.

Recursion in Python Class 12 Questions and Answers

1. What is recursion?
Answer – Python also permits function recursion, allowing defined functions to call one another. A frequent idea in math and programming is recursion. It denotes that a function makes a call to itself. This has the advantage of allowing you to loop through data to arrive at a conclusion.

2. What are base case and recursive case?
Answer – Recursive functions are ones that make calls to themselves. The base case and the recursive case are its two main components. The prerequisite for stopping the recursion is the base case. When a function calls on itself, it is said to be in a recursive case.

3. Why is base case so important in a recursive function?
Answer – The basic case of a suitable recursive function must always exist: A method of returning without performing a recursive call is the basic case. In other words, it is the mechanism that puts an end to this cycle of recursive calls that keep getting bigger and bigger while a stack of function calls waits for other function calls to return.

4. When does infinite recursion occur?
Answer – A recursion will continue to make recursive calls indefinitely if it never hits a base case, and the programme will never come to an end. This is referred to as infinite recursion, and it is typically not recommended. A programme with infinite recursion won’t typically run forever in most programming environments.

5. Compare iteration and recursion.
Answer – Iteration and recursion are two alternative approaches to repeatedly carrying out a set of instructions. The key distinction between the two is that whereas in iteration we use loops like “for” and “while,” in recursion we utilise function calls to continually execute the statements inside the function body.

Computer Science Class 12 Notes

  1. Python Revision tour – 1 Class 12 Notes
  2. Python Revision tour – 2 Class 12 Notes Notes
  3. Working with Functions Class 12 Notes
  4. Using Python Libraries Class 12 Notes
  5. File Handling Class 12 Notes
  6. Recursion Class 12 Notes
  7. Idea of Algorithmic Efficiency Class 12 Notes
  8. Data Visualization using Pyplot Class 12 Notes
  9. Data Structure Class 12 Notes
  10. Computer Network Class 12 Notes
  11. More on MySQL Class 12 Notes

MCQ for Class 12 Computer Science Python

  1. Python Revision tour – 1 Class 12 MCQs
  2. Python Revision tour – 2 Class 12 MCQs
  3. Working with Functions Class 12 MCQs
  4. Using Python Libraries Class 12 MCQs
  5. File Handling Class 12 MCQs
  6. Recursion Class 12 MCQs
  7. Data Visualization using Pyplot Class 12 MCQs
  8. Data Structure Class 12 MCQs
  9. Computer Network Class 12 MCQs
  10. More on MySQL Class 12 MCQs

Computer Science Class 12 Questions and Answers

  1. Python Revision tour – 1 Class 12 Questions and Answers
  2. Working with Functions Class 12 Questions and Answers
  3. Using Python Libraries Class 12 Questions and Answers
  4. File Handling Class 12 Questions and Answers
  5. Recursion Class 12 Questions and Answers
  6. Idea of Algorithmic Efficiency Class 12 Questions and Answers
  7. Data Structure Class 12 Questions and Answers
  8. More on MySQL Class 12 Questions and Answers
  9. Computer Network Class 12 Questions and Answers
  10. More on MySQL Class 12 Questions and Answers 
error: Content is protected !!