MCQs > IT & Programming > Python > Output of the following Python code? def abc(n): if n <= 1: return n else: return(abc(n-1) + abc(n-2)) print('1') nterms = 13 if nterms <= 0: print('0') else: for i in range(nterms): x=abc(i) print(x+11)

Python MCQs

What will be the correct output of the following Python code?

def abc(n):

   if n <= 1:

    return n

   else:

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

    print("1")

nterms = 13

if nterms <= 0:

   print("0")

else:

   for i in range(nterms):

    x=abc(i)

   print(x+11)


Answer

Correct Answer:

155 

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

More Python MCQ Questions

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it