Exercise 29 Study Drill (4)


#1

I used != in the if condition: if people != dogs and then it asked it to print something. What other boolean expressions can I use in the if-statements (and, or, not) and how can I use them?


#2

There is a format to Zed’s teaching technique that is worth understanding. He will give you a new concept, over 2 or 3 exercise, and you repeat it, learning it more deeply.

The additional study drills are a useful way to explore the topic further, to play, try stuff, explore further if you want or are stimulated to do so. If you don’t get it, make notes and move on.


#3

You can find a list of all Python comparison eperations here (it is not easy to find in the Python docs):
https://docs.python.org/2.0/lib/comparisons.html

And a list of all Boolean operations you can find here:
https://docs.python.org/2.0/lib/boolean.html