Quiz Discussion

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

bool(‘False’)
bool()

 

Course Name: Python

  • 1]
    True
    True
  • 2]

    False
    True

  • 3]

    True
    False

  • 4]

    False
    False

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 value of the following Python expression?

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

 

  • 1]

    0b10000b1000

  • 2]

    0b1000b1000

  • 3]

    0b10001000

  • 4]

    0b10000

Solution
3
Discuss

To find the decimal value of 1111, that is 15, we can use the function:

  • 1]

    int(‘1111’,2)

  • 2]

    int(1111,2)

  • 3]

    int(‘1111’,10)

  • 4]

    int(1111,10)

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

Any odd number on being AND-ed with ________ always gives 1. Hint: Any even number on being AND-ed with this value always gives 0.

  • 1]

    10

  • 2]

    2

  • 3]

    1

  • 4]

    0

Solution
6
Discuss

What will be the output of the following Python expression?

4^12

 

  • 1]

    2

  • 2]

    4

  • 3]

    8

  • 4]

    12

Solution
7
Discuss

What will be the output of the following Python expression if x=15 and y=12?

x & y

 

  • 1]

    1101

  • 2]

    12

  • 3]

    0b1101

  • 4]

    b1101

Solution
8
Discuss

What will be the output of the following Python expression?

24//6%3, 24//4//2

 

  • 1]

    (3,1)

  • 2]

    (1,0)

  • 3]

    (0,3)

  • 4]

    (1,3)

Solution
9
Discuss

Bitwise _________ gives 1 if either of the bits is 1 and 0 when both of the bits are 1.

  • 1]

    OR

  • 2]

    AND

  • 3]

    XOR

  • 4]

    NOT

Solution
10
Discuss

Which among the following list of operators has the highest precedence?

 +, -, **, %, /, <<, >>, |

 

  • 1]

    %

  • 2]

    |

  • 3]

    **

  • 4]

    <<, >>

Solution
# Quiz