Logo

Python Questions Set 175:

Quiz Mode

 Private members of a class cannot be accessed. 

1
2

Solution:

 

i = 0

while i < 3:

    print i

    i++

    print i+1

1
2
3
4

Solution:

 

What will be the value of X in the following Python expression?

X = 2+9*((3*12)-8)/10

1
2
3
4

Solution:

Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is: 

1
2
3
4

Solution:

What will be the output of the following Python code snippet?


x = 2


for i in range(x):

    x -= 2

    print (x)

1
2
3
4

Solution:

If a={5,6,7}, what happens when a.add(5) is executed? 

1
2
3
4

Solution:

 

What Is The Order Of Usage Of  *Args, **Kwargs, And Formal Args In Function Header?

1
2
3
4

Solution:

 To sterilize an object hierarchy, the _____________ function must be called. To desterilize a data stream, the ______________ function must be called. 

1
2
3
4

Solution:

 Which of the following best describes inheritance?
 

1
2
3
4

Solution: