Here’s my work.
Here’s the link to exercise 29.
1. What do you think the if does to the code under it?
If the if statement is true, it will run the code, otherwise it will not run the code.
2. Why does the code under the if need to be indented two spaces?
3. What happens if it isn’t indented?
Your code will break your computer and explode, and the world will end. Just kidding, nothing will happen, but keep in mind, the next person who reads your code could be your boss, so better start making that habit now.
4. Can you put other boolean expressions from Exercise 27 in the if-statement? Try it.
Done. Line 38-40
5. What happens if you change the initial values for people, cats, and dogs?
The if statement true and false will also change, different codes will run while some doesnt.