13. What is the value of list L after the following code segment is run :
L=[1,3,2]
sorted(L)
- L:[1,3,2]
- L:[1,2,3]
- L:[0,0,0]
15. what is the output of the following lines of code:
def Print(A):
for a in A:
print(a+'1')
Print(['a','b','c'])
a
b
c
a1
b1
c1
- a1
16. Why do we use exception handlers?
- Read a file
- Terminate a program
- Write a file
- Catch errors within a program
17. What is the purpose of a try…except statement?
- Only executes if one condition is true
- Crash a program when errors occur
- Catch and handle exceptions when an error occurs
- Executes the code block only if a certain condition exists
Shuffle Q/A 2
19. What does a method do to an object?
- Changes or interacts with the object
- Returns a new values