Solved

Which of the Following Statements A), B) or C) Is

Question 11

Multiple Choice

Which of the following statements a) , b) or c) is false?


A) Strings can be compared with the comparison operators. Recall that strings are compared based on their underlying integer numeric values. So uppercase letters compare as less than lowercase letters because uppercase letters have lower integer values.
B) You can check character codes with ord. For example, the following code displays the values 65 and 97 for A and a, respectively: print(f'A: {ord("A") }; a: {ord("a") }')
C) In the following interactive session that compares the strings 'Orange' and 'orange', the outputs of snippets [2] and [6] (marked as ???) are False and True: In [1]: 'Orange' == 'orange'
Out[1]: False
In [2]: 'Orange' != 'orange'
Out[2]: ???
In [3]: 'Orange' < 'orange'
Out[3]: True
In [4]: 'Orange' <= 'orange'
Out[4]: True
In [5]: 'Orange' > 'orange'
Out[5]: False
In [6]: 'Orange' >= 'orange'
Out[6]: ???
D) All of the above statements are true.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents