Ask Question
4 June, 05:08

What is the output of the following Python statements? def recurse (a) : if (a = = 0) : print (a) else: recurse (a) recurse (0)

+1
Answers (1)
  1. 4 June, 07:29
    0
    d) 0 1 1 2

    The above piece of code prints the Fibonacci series.

    Explanation:

    def a (n):

    if n = = 0:

    return 0

    elif n = = 1:

    return 1

    else:

    return a (n-1) + a (n-2)

    for i in range (0,4):

    print (a (i), end=" ")
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “What is the output of the following Python statements? def recurse (a) : if (a = = 0) : print (a) else: recurse (a) recurse (0) ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers