Have any questions?
[email protected]
English
Vietnamese
French
Spanish
Korean
Japanese
Thai
Chinese
Indonesian
Login
Signup
Contact
Login
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
20 minutes
10 questions
Do test
Some questions from the same exam
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)
Which function can be used on the file to display a dialog for saving a file?
Select the valid code to bind a canvas with a key event p −
Which is invalid in python for z = 5 ?
What is the value of a?
a= 4*4-4+4/4
What will be the value of x?
x = ~~~~19
print(x)
What will be the output of the code?
z = ''Best website is Tutorials Point''
z.find(''Tutorials'')
How can we generate random numbers in python using methods?
What is output of following −
print('any'.encode())
Which of the following is correct about Python?
Some other questions you may be interested in
One of my ....... lights is burned out and I have to get it fixed before I get a ticket. This is a necessary light that*^*is located at the back end of most cars and trucks.
"Don't hit the .......! That will only make you go faster!" Dad said to Tommy when he was teaching him to drive.*^*Teaching teenagers to drive is a scary thing!
"Your hands should be at the 10 and 2 position on the ....... wheel at all time when you are driving," the driving*^*instructor told the student driver, Tommy. "Don't drive with one hand at all keep both hands on the wheel at all*^*time."
My car ....... was stolen last week. Now, I can't listen to music while I'm driving so I've been singing a lot.
"The gear ....... is used to change gears this works with the transmission equipment in most cars," the driving*^*instructor explained to the student driver, Tommy. "So, you use this when you want to go into a lower or higher*^*gear."
Do you know how to drive a ....... transmission? I do and I like it better than the automatic version.*^*