Logo

Python Questions Set 75:

Quiz Mode

for i in range(int("3.6")):

        print(i, end="")

1
2
3
4

Solution:

 Which is the correct operator for power(x^y)? 

1
2
3
4

Solution:

What is the output of the following Python command?


print(11 // 2)

1
2
3
4

Solution:

 How many keyword arguments can be passed to a function in a single function call? 

1
2
3
4

Solution:

 What is the output of the given code?


a=2

def add():

b=3

c=a+b

print(c)

add()

1
2
3
4

Solution:

What is the value of the expression:

bin(10 - 2) + bin(12^4)

1
2
3
4

Solution:

Consider a list l, with elements [1,2,3]. What is the output of l*2.

1
2
3
4

Solution:

When a Python function does not explicitly return a value, what is the default value returned?

1
2
3
4

Solution:

 

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

a={1:"A",2:"B",3:"C"}
a.setdefault(4,"D")
print(a)

1
2
3
4

Solution:

Which of the following statements about variable names in Python is true?

1
2
3
4

Solution: