हिंदी

Give the output of the following when num1 = 4, num2 = 3, num3 = 2. print(5 % 10 + 10 < 50 and 29 <= 29) - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

Give the output of the following when num1 = 4, num2 = 3, num3 = 2.

print(5 % 10 + 10 < 50 and 29 <= 29)

टिप्पणी लिखिए
Advertisements

उत्तर

print(5 % 10 + 10 < 50 and 29 <= 29)
Taking the above statement in two separate parts

LHS :
5 % 10 + 10 < 50
5 + 10 < 50
15 < 50
True

RHS:
29 <= 29
True

Now, the complete equation can be written as
print(True and True)
Therefore, the output will be 'True'.

shaalaa.com
Operators - Arithmetic Operators (-,+,*,/,%)
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 5: Getting Started with Python - Exercise [पृष्ठ ११७]

APPEARS IN

एनसीईआरटी Computer Science [English] Class 11
अध्याय 5 Getting Started with Python
Exercise | Q 7. m) | पृष्ठ ११७
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×