Ask Question
10 November, 05:37

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

+5
Answers (1)
  1. 10 November, 05:53
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers