Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Digital : Python_Intermediate_iON LX_Async_&_SP_Assessment - Course ID: 54196

CLP - Python - Generic - SelfPaced - Assessment Only - E2 Batch 1

Question 4

Which of the following can be used to invoke the __init__ method in X from Y, where Y is a subclass of X
in (in Python 3.x)?(Chosse two)

1. super().__init__()
2. super().__init__(self)
3. X.__init_(self)
4. X.__init__()

Answer:

1. super().__init__()

3.X.__init_(self)

Question 5

What will be the output of the following program?

def country (*abc):

if len(abc) ==1:

item= abc[0]

def f(obj):

rerun obj[item]

else:

def f(obj):

return tuple(obj[item] for item in abc)

return f

selection = []

selection = country(slice(2, None))(‘AUSTRALIA’)

print(selection)

1. USTRALIA

This study source was downloaded by 100000813364844 from CourseHero.com on 01-23-2023 07:34:48 GMT -06:00

https://www.coursehero.com/file/104858911/Digital-Python-Intermediate-iON-LX-Async-SP-Assessment-4-5docx/
2. ALIA
3. STRALIA
4. AU

Answer: STRALIA

This study source was downloaded by 100000813364844 from CourseHero.com on 01-23-2023 07:34:48 GMT -06:00

https://www.coursehero.com/file/104858911/Digital-Python-Intermediate-iON-LX-Async-SP-Assessment-4-5docx/
Powered by TCPDF (www.tcpdf.org)

You might also like