CBSE Class 11 Computer Science Question 123 of 173

Data Handling — Question 12

Back to all questions
12
Question

Question 8

Consider the following expression:

x = "and" * (3 + 2) > "or" + "4"

What is the data type of value that is computed by this expression?

Answer

The data type of value that is computed by this expression is bool.

    x = "and" * (3 + 2) > "or" + "4"
⇒ x = "and" * 5 > "or" + "4"
⇒ x = "andandandandand" > "or4"
⇒ x = False

Answer