Track 3 · Lesson 5 of 11
Comparisons in depth
Chain comparisons, compare text reliably, check for None with is, and compare floating-point numbers safely.
You will be able to
- Write range conditions as chained comparisons such as 18 <= temp <= 24
- Compare strings without being caught out by letter case or stray spaces
- Explain the difference between == and is, and use is only for None
- Compare floating-point results with a tolerance instead of ==
Included with a Formula Quest membership
It has 4 graded exercises with feedback, hints and solutions. Python Quest is included in Formula Quest memberships that cover Python; membership and billing are managed on Formula Quest.
View Formula Quest memberships
Tracks 1 and 2, the first lesson of every track, the playground and the dataset library are free.