Python Multiple Choice Questions (Test 3)

Python Multiple Choice Questions (Test 3)

1 / 20

What will be the output after the following statements?
x = [5, 4, 3, 2]
x.insert(1, 0)
print(x)

2 / 20

What will be the output after the following statements?
x = [5, 4, 3, 2]
x.append(1)
print(x)

3 / 20

What will be the output after the following statements?
x = [5, 4, 3, 2]
print(x)

4 / 20

What will be the output after the following statements?
x = [15, 45, 85, 95]
print(x[3]-x[1])

5 / 20

What will be the output after the following statements?
x = 3
y = 4
print(x*y)

6 / 20

What will be the output after the following statements?
x = [[0.0, 1.0, 2.0],[4.0, 5.0, 6.0]]
y = x[0][1] + x[1][0]
print(y)

7 / 20

What will be the output after the following statements?
x = [[0.0, 1.0, 2.0],[4.0, 5.0, 6.0]]
y = x[1][2]
print(y)

8 / 20

What will be the output after the following statements?
x = ['Sunday', 'Monday', 'Tuesday']
y = x[1] + x[2]
print(y)

9 / 20

What will be the output after the following statements?
x = [10, 20, 30]
y = x[1] + x[2]
print(y)

10 / 20

What will be the output after the following statements?
x = [25, 35, 45]
y = x[0]
print(y)

11 / 20

What will be the output after the following statements?
x = ['Today', 'Tomorrow', 'Yesterday']
y = x[1]
print(y)

12 / 20

What is the data type of x after the following statement?
x = ['Today', 'Tomorrow', 'Yesterday']

13 / 20

What is the data type of x after the following statement?
x = [7, 8, 9, 10]

14 / 20

What will be the value of x, y and z after the following statement?
x, y, z = 3, 4, 5

15 / 20

. What will be the value of x, y and z after the following statement?
x = y = z = 300

16 / 20

What will be the output after the following statements?
x = y = z = 8
print(y)

17 / 20

What will be the data type of y after the following statements?
x = 48
y = str(x)

18 / 20

What will be the data type of y after the following statements?
x = 71
y = float(x)

19 / 20

What will be the data type of y after the following statements if input entered
is 50?
x = input('Enter a number: ')
y = int(x)

20 / 20

What will be the data type of x after the following statement if input entered
is 18 ?
x = input('Enter a number: ')

Your score is

The average score is 93%

0%

Leave a Comment

Exit mobile version