>>>Task
Comparison operators give you back a boolean — True or False:
| operator | means |
|---|---|
== |
equal to |
!= |
not equal to |
< > |
less / greater than |
<= >= |
less / greater than or equal to |
print(5 > 3) # True
print(5 == 3) # FalseWatch the difference between = and ==. One assigns a value, the other asks a
question. Mixing them up is the single most common beginner bug.
You can combine booleans with and (both must be true), or (at least one), and not
(flips it).
Using score and attendance, create:
passed — is score at least 60?perfect_attendance — is attendance exactly 100?gets_award — did they pass and have perfect attendance?The solution unlocks after a few minutes.
Run your code to see the output.