Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Eric Newcomb4,054 Points
Shouldn't the answer to this be True? Is 'l' greater than 'z'?
( 'lion' > 'zebra' )
When comparing two strings, we compare the first letter of the first string with the first letter of the second string. Since 'l' comes before 'z', the above statement should be true. But the quiz tells me I'm wrong.
Stangely, the explanation for both true and false in the quiz is exactly the same: l comes before z.
Am I missing something?
Steven Parker217,573 Points
Anything that "comes before" is considered to be "less than". So just as 3 comes before 8, and therefore 3 is less than 9; "l" comes before "z", so "l" is less than "z".
The descriptions in the quiz for the two choices differ by the word "not". The choice for "False" reads "Since 'l' comes before 'z' in the alphabet, 'lion' is not greater than 'zebra.'"