Quiz Discussion

What will be the output of the following Python expression?

4^12

 

Course Name: Python

  • 1]

    2

  • 2]

    4

  • 3]

    8

  • 4]

    12

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

What will be the output of the following Python expression?

bin(29)

 

  • 1]

    ‘0b11011’

  • 2]

    ‘0b11111’

  • 3]

    ‘0b11101’

  • 4]

    ‘0b10111’

Solution
2
Discuss

Which of the following expressions results in an error?

  • 1]

    int(’10.8’)

  • 2]

    float(’10.8’)

  • 3]

    int(‘10’)

  • 4]

    float(‘10’)

Solution
3
Discuss

What will be the value of the following Python expression?

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

 

  • 1]

    0b10000b1000

  • 2]

    0b1000b1000

  • 3]

    0b10001000

  • 4]

    0b10000

Solution
4
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
5
Discuss

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

not(3>4)
not(1&1)

 

  • 1]
    True
    True
  • 2]
    True
    False
  • 3]
    False
    True
  • 4]
    False
    False
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

Which of the following expressions is an example of type conversion?

  • 1]

    3 + 7

  • 2]

    5.0 + 3

  • 3]

    5.3 + 6.3

  • 4]

    4.0 + float(3)

Solution
8
Discuss

Which of the following represents the bitwise XOR operator?

  • 1]

    !

  • 2]

    |

  • 3]

    ^

  • 4]

    &

Solution
9
Discuss

What is the value of the following Python expression?

bin(0x8)

 

  • 1]

    ‘0b1000’

  • 2]

    1000

  • 3]

    8

  • 4]

    ‘0bx1000’

Solution
10
Discuss

What will be the value of x in the following Python expression, if the result of that expression is 2?

x>>2

 

  • 1]

    1

  • 2]

    2

  • 3]

    4

  • 4]

    8

Solution
# Quiz