# Quiz Discussion

What will be the output of the following Python code snippet if x=1?

x<<2

Course Name: Python

• 1]

4

• 2]

2

• 3]

1

• 4]

8

##### Solution
No Solution Present Yet

#### Top 5 Similar Quiz - Based On AI&ML

Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api

# Quiz
1
Discuss

Which of the following expressions results in an error?

• 1]

int(‘1011’)

• 2]

int(1011,2)

• 3]

int(‘1011’,23)

• 4]

int(1011)

##### Solution
2
Discuss

What will be the output of the following Python code?

l=[1, 0, 2, 0, 'hello', '', []]
list(filter(bool, l))

• 1]

[1, 2, ‘hello’]

• 2]

[1, 0, 2, ‘hello’, ”, []]

• 3]

[1, 0, 2, 0, ‘hello’, ”, []]

• 4]

Error

##### Solution
3
Discuss

What will be the output of the following Python expression?

~100?

• 1]

-100

• 2]

100

• 3]

-101

• 4]

101

##### Solution
4
Discuss

What is the two’s complement of -44?

• 1]

10110011

• 2]

11101011

• 3]

11010100

• 4]

1011011

##### Solution
5
Discuss

What will be the output of the following Python code if a=10 and b =20?

a=10
b=20
a=a^b
b=a^b
a=a^b
print(a,b)

• 1]

20 20

• 2]

20 10

• 3]

10 10

• 4]

10 20

##### Solution
6
Discuss

What will be the output of the following Python expression?

print(4.00/(2.0+2.0))

• 1]

1

• 2]

1.00

• 3]

1.0

• 4]

Error

##### Solution
7
Discuss

What will be the value of the following Python expression?

float(4+int(2.39)%2)

• 1]

4

• 2]

4.0

• 3]

5

• 4]

5.0

##### Solution
8
Discuss

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

['hello', 'morning'][bool('')]

• 1]

morning

• 2]

hello

• 3]

no output

• 4]

error

##### Solution
9
Discuss

What will be the value of X in the following Python expression?

X = 2+9*((3*12)-8)/10

• 1]

27.2

• 2]

28.4

• 3]

30.8

• 4]

30.0

##### Solution
10
Discuss

What will be the output of the following Python code?

['f', 't'][bool('spam')]

• 1]

Error

• 2]

No output

• 3]

f

• 4]

t

# Quiz