Logo

Python Questions Set 190:

Quiz Mode

The -------------------  module is the standard module that is used to generate a random number. 

Solution:

What is the output of the following Python code?

print(0.1 + 0.2 == 0.3)

1
2
3
4

Solution:

Find the output of the following code:


x="Hello World !!"

print(x.index("World"))

1
2
3
4

Solution:

 

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

print('+99'.zfill(5))

1
2
3
4

Solution:

What is the output of the following Python code?

def function(*a):

num=[*a]

print(num)

function()

1
2
3
4

Solution:

 When the security context enables carefully written stored programs to be set up that provide controlled access to tables for users, it is called __________

 

1
2
3
4

Solution:

 

What Is The Output Of The Following Code Snippet?

def func(x, y=2):
   num = 1
   for i in range(y):
      num = num * x
   return num
print (func(4))
print (func(4, 4))

1
2
3

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
4

Solution:

 What is the order of precedence in python?

i) Parentheses
ii) Exponential
iii) Multiplication
iv) Division
v) Addition
vi) Subtraction 

1
2
3
4

Solution:

 

What will be the output of the following Python code?

a = ('check',)
n = 2
for i in range(int(n)):
   a = (a,)
   print(a)

1
2
3
4

Solution: