Logo

Python Questions Set 139:

Quiz Mode

What Python versions can be used with Django 2.1 and 2.2?

1
2
3
4

Solution:

What does 'DRF' stand for?

1
2
3
4

Solution:

Find the output of the following code:


x=(1,3,4,5,5,1,7)

y=2

x.append(2)

print(x)

1
2
3
4

Solution:

  What is the interval of the value generated by the function random.random(), assuming that the random module has already been imported? 

1
2
3
4

Solution:

Which PDB command is used to list the source code?

1
2
3
4

Solution:

What does CSRF stand for?

1
2
3
4

Solution:

 

What will be the output of the following Python code?

values = [[3, 4, 5, 1], [33, 6, 1, 2]]

v = values[0][0]

for row in range(0, len(values)):

for column in range(0, len(values[row])):

if v < values[row][column]:

           v = values[row][column]

print(v)

1
2

Solution:

Which of these is false about recursion? 

1
2
3
4

Solution:

Which of the following statements about method overriding in object-oriented programming is true?

1
2
3
4

Solution:

What is the output of the following Python code?

class Test:
def __init__(self):
self.x = 0
class Derived_Test(Test):
def __init__(self):
Test.__init__(self)
self.y = 1
def main():
b = Derived_Test()
print(b.x, b.y)

1
2
3
4

Solution: