Quiz Discussion

Which one of these is floor division?

Course Name: Python

  • 1]

    /

  • 2]

    %

  • 3]

    //

  • 4]

    None of the mentioned

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 code?

>>>str="hello"
>>>str[:2]
>>>

 

  • 1]

    he

  • 2]

    olleh

  • 3]

    lo

  • 4]

    hello

Solution
2
Discuss

Which one of the following has the same precedence level?

  • 1]

    Addition and Subtraction

  • 2]

    Multiplication, Division and Addition

  • 3]

    Multiplication, Division, Addition and Subtraction

  • 4]

    Addition and Multiplication

Solution
3
Discuss

What is the order of precedence in python?

i) Parentheses
ii) Exponential
iii) Multiplication
iv) Division
v) Addition
vi) Subtraction

  • 1]

    i,ii,iii,iv,v,vi

  • 2]

    ii,i,iii,iv,v,vi

  • 3]

    ii,i,iv,iii,v,vi

  • 4]

    i,ii,iii,iv,vi,v

Solution
4
Discuss

Which of the following will run without errors?

  • 1]

    round(45.8)

  • 2]

    round(7463.123,2,1)

  • 3]

    round()

  • 4]

    round(6352.898,2,5)

Solution
5
Discuss

What is the value of the following expression?

float(22//3+3/3)

 

  • 1]

    8

  • 2]

    8.0

  • 3]

    8.3

  • 4]

    8.33

Solution
6
Discuss

Which of the following operators has its associativity from right to left?

  • 1]

    +

  • 2]

    //

  • 3]

    %

  • 4]

    **

Solution
7
Discuss

What will be the value of the following Python expression?

4 + 3 % 5

 

  • 1]

    4

  • 2]

    7

  • 3]

    2

  • 4]

    0

Solution
8
Discuss

What is the value of the following expression?

2+4.00, 2**4.0

 

  • 1]

    (6.0, 16.0)

  • 2]

    (6.00, 16.00)

  • 3]

    (6, 16)

  • 4]

    (6.00, 16.0)

Solution
9
Discuss

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

def example(a):
    a = a + '2'
     a = a*2
    return a
>>>example("hello")

 

  • 1]

    indentation Error

  • 2]

    cannot perform mathematical operation on strings

  • 3]

    hello2

  • 4]

    hello2hello2

Solution
10
Discuss

The one’s complement of 110010101 is:

  • 1]

    001101010

  • 2]

    110010100

  • 3]

    110010101

  • 4]

    001101011

Solution
# Quiz