• Home
  • What is the out of the 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)
Question 1:
What is the out of the 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)
A. The program runs fine without error
B. Program displays 15 14 13 12 11
C. Program displays 11 12 13 14 15
D. Program displays 15 14 13 12 11 and then raises an index out of range exception.

These questions are from this test. Would you like to take a practice test?

Python Quiz 4 | Englishfreetest.com