Quiz: Python Part-1

To View Tricks: Login Required

Number of Questions: 37

Question: 16 -

Which one of the following has the same precedence level?

Options:
  1. Power and Division

  2. Subtraction and Division

  3. Division and Multiplication

  4. Division, Power, Multiplication, Addition and Subtraction

  5. Answer:

    Division and Multiplication

    Solution not available.

Question: 17 -

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

Options:
  1. Parentheses

  2. Subtraction

  3. Division

  4. Power

  5. Answer:

    Parentheses

    Solution not available.

Question: 18 -

 Which of the following precedence order is correct in Python?

Options:
  1. Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

  2. Division, Multiplication, Addition, Subtraction, Parentheses, Exponential

  3. Multiplication, Division, Addition, Subtraction, Parentheses, Exponential

  4. Parentheses, Exponential, Multiplication, Division, Addition, Subtraction

  5. Answer:

    Parentheses, Exponential, Multiplication, Division, Addition, Subtraction

    Solution:

    PEMDAS (similar to BODMAS).


Question: 19 -

Which of the following is correctly evaluated for this function?

 
pow(x,y,z)

Options:
  1. (x**y) % z

  2. (x**y) / z

  3. (x / y) * z

  4. (x / y) / z

  5. Answer:

    (x**y) % z

    Solution not available.

Question: 20 -

Which of the following functions is a built-in function in python language?

Options:
  1. printf()

  2. val()

  3. print()

  4. None of these

  5. Answer:

    print()

    Solution not available.