Ask Question
22 July, 16:35

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

+4
Answers (1)
  1. 22 July, 18:23
    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?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers