Quiz Discussion

Which one of the following has the same precedence level?

Course Name: Python

  • 1]

    Addition and Subtraction

  • 2]

    Multiplication, Division and Addition

  • 3]

    Multiplication, Division, Addition and Subtraction

  • 4]

    Addition and Multiplication

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

Given a function that does not return any value, What value is thrown by default when executed in shell.

  • 1]

    int

  • 2]

    bool

  • 3]

    void

  • 4]

    None

Solution
2
Discuss

The value of the expressions 4/(3*(2-1)) and 4/3*(2-1) is the same.

  • 1]

    True

  • 2]

    False

Solution
3
Discuss

In python we do not specify types, it is directly interpreted by the compiler, so consider the following operation to be performed.

>>>x = 13 ? 2

the objective is to make sure x has an integer value, select all that apply

  • 1]

    x = 13 // 2

  • 2]

    x = int(13 / 2)

  • 3]

    x = 13 % 2

  • 4]

    All of the mentioned

Solution
4
Discuss

What will be the value of the following Python expression?

4 + 3 % 5

 

  • 1]

    4

  • 2]

    7

  • 3]

    2

  • 4]

    0

Solution
5
Discuss

Mathematical operations can be performed on a string.

  • 1]

    True

  • 2]

    False

Solution
6
Discuss

What is the return value of trunc()?

  • 1]

    int

  • 2]

    bool

  • 3]

    float

  • 4]

    None

Solution
7
Discuss

What will be the output of the following Python code?

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

 

  • 1]

    he

  • 2]

    olleh

  • 3]

    lo

  • 4]

    hello

Solution
8
Discuss

What is the average value of the following Python code snippet?

>>>grade1 = 80
>>>grade2 = 90
>>>average = (grade1 + grade2) / 2

 

  • 1]

    85.0

  • 2]

    85.1

  • 3]

    95.0

  • 4]

    95.1

Solution
9
Discuss

 Evaluate the expression given below if A = 16 and B = 15.

A % B // A

 

  • 1]
    0.0
  • 2]

    0

  • 3]

    1.0

  • 4]

    1

Solution
10
Discuss

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

x = int(43.55+2/2)

 

  • 1]

    43

  • 2]

    44

  • 3]

    22

  • 4]

    23

Solution
# Quiz