Quiz Discussion

What will be the output of the following Python expression?

int(1011)?

 

Course Name: Python

  • 1]

    1101

  • 2]

    13

  • 3]

    11

  • 4]

    1011

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?

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

 

  • 1]

    (3,1)

  • 2]

    (1,0)

  • 3]

    (0,3)

  • 4]

    (1,3)

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

What will be the output of the following Python code?

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

 

  • 1]

    Error

  • 2]

    No output

  • 3]

    f

  • 4]

    t

Solution
6
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
7
Discuss

Which of the following Boolean expressions is not logically equivalent to the other three?

  • 1]

    not(-6>10 or-6==10)

  • 2]

    not(-6<10 or-6==10)

  • 3]

    -6>=0 and -6<=10

  • 4]

    not(-6<0 or-6>10)

Solution
8
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
9
Discuss

What will be the output of the following Python expression?

4^12

 

  • 1]

    2

  • 2]

    4

  • 3]

    8

  • 4]

    12

Solution
10
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
# Quiz