Logo

Python Questions Set 70:

Quiz Mode

 In the following code, n is a/an _______? 

 n = '5'

1
2
3
4

Solution:

The _________ function returns the object representation.

1
2
3

Solution:

Deduce the output of the following code:


l=[]

l.append([2,4,6])

l.insert(3,7)

print(l[1])

Solution:

 Which of the following is not a valid namespace? 

1
2
3
4

Solution:

What will be the output of the following Python code?

>>> a={1,2,3}
>>> b=a.add(4)
>>> b

1
2
3
4

Solution:

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

{a**2 for a in range(4)}

1
2
3
4

Solution:

What is the output of the following code?


x = 10

y = 20

z = 19

x, y, z = y, z, x

print(x > y)

print(x / 2 == z)

1
2
3
4

Solution:

Given the lists:

a = [1, 2, 3, 4, 5, 6]

b = [2, 3, 4, 5, 6, 7, 8]

What will the output of the following code be?

print(a > b)

1
2
3
4

Solution:

Which of the following statements about the append() method in Python is true?

1
2
3
4

Solution:

 

Which Of The Following Statements Is Most Accurate For The Declaration X = Circle()?

1
2
3
4

Solution: