Guess the output of the following code

def rev_func(x,length):
print(x[length-1],end='' '')
rev_func(x,length-1)
x=[11, 12, 13, 14, 15]
rev_func(x,5)

The program runs fine without error

Program displays 15 14 13 12 11

Program displays 11 12 13 14 15

Program displays 15 14 13 12 11 and then raises an index out of range exception

Correct Option - d

To get all Infosys Certified Data Science using Python Professional-Part1 Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in