Solved

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

Question 12

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