हिंदी

Give the output of the following when num1 = 4, num2 = 3, num3 = 2. print('Bye' == 'BYE') - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

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

print('Bye' == 'BYE')

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

उत्तर

print('Bye' == 'BYE')

As Python compares string character to character and when different characters are found then their Unicode value is compared. The character with a lower Unicode value is considered to be smaller. Here, 'y' has Unicode 121 and 'Y' has 89. Therefore, the output will be 'False'.

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

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×