33.3k views
3 votes
4) Consider the following code segment:

s1 = "CAT"
s2 = "cat"
Which of the following if statements has a condition that evaluates to True?
a) if s1 == s2
b) if s1 = s2
c) if s1 < s2
d) if s1 > s2

User Wildcat
by
5.4k points

1 Answer

3 votes

Answer:

The correct answer is if s1 < s2.

Step-by-step explanation:

In this case, the condition s1 < s2 will evaluate to True because the string "CAT" comes alphabetically before the string "cat".

User Calvin Nunes
by
6.2k points