Quiz Discussion

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

x = int(43.55+2/2)

 

Course Name: Python

  • 1]

    43

  • 2]

    44

  • 3]

    22

  • 4]

    23

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 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
2
Discuss

What is the return value of trunc()?

  • 1]

    int

  • 2]

    bool

  • 3]

    float

  • 4]

    None

Solution
3
Discuss

The expression Int(x) implies that the variable x is converted to integer.

  • 1]

    True

  • 2]

    False

Solution
4
Discuss

What data type is the object below?

L = [1, 23, 'hello', 1]

 

  • 1]

    list

  • 2]

    dictionary

  • 3]

    array

  • 4]

    tuple

Solution
5
Discuss

Mathematical operations can be performed on a string.

  • 1]

    True

  • 2]

    False

Solution
6
Discuss

What is the return type of function id?

  • 1]

    int

  • 2]

    float

  • 3]

    dict

  • 4]

    bool

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

Which one of the following has the highest precedence in the expression?

  • 1]

    Exponential

  • 2]

    Addition

  • 3]

    Parentheses

  • 4]

    Multiplication

Solution
9
Discuss

Which is the correct operator for power(xy)?

  • 1]

    X^y

  • 2]

    X**y

  • 3]

    X^^y

  • 4]

    None of the mentioned

Solution
10
Discuss

What will be the value of the following Python expression?

4 + 3 % 5

 

  • 1]

    4

  • 2]

    7

  • 3]

    2

  • 4]

    0

Solution
# Quiz