Logo

Python Questions Set 46:

Quiz Mode

What does MVT stand for?

1
2
3
4

Solution:

  To insert 5 to the third position in list1, we use which command? 

1
2

Solution:

 Which of the following functions can accept more than one positional argument? 

1
2
3
4

Solution:

What is the output of the given code?


a='Abekus'


print('a' not in  a)

print('A' not in  a)

1
2
3
4

Solution:

 

What will be the output of the following Python code?


 def foo():  

   return total + 1

 total = 0

 print(foo()) 

1
2
3
4

Solution:

 In _______________ copy, the base address of the objects are copied. In _______________ copy, the base address of the objects are not copied. 

1
2
3

Solution:

Ravi what to try something new in python programming. So he coded a random command such as:


a = [[x,y,z] for x in range(0,3) for y in range(0,2) for z in range(1,4)]


So what will the output of above command.

1
2
3
4

Solution:

  Which of the following is true about top-down design process? 

1
2
3
4

Solution:

What will be the output of the following code?

def student(name, age, *marks): print("name:", name) print("age:", age) print("marks:", marks)

student('vinay', 20, 76, 87, 74, 86)

1
2
3
4

Solution:

 

What will be the output of the following Python code?

sentence = 'horses are fast'
regex = re.compile('(?P<animal>\w+) (?P<verb>\w+) (?P<adjective>\w+)')
matched = re.search(regex, sentence)
print(matched.group(2))

1
2
3
4

Solution: