From fbbbff2f690276d85e50e05c6df4c68d8c1774fb Mon Sep 17 00:00:00 2001 From: Joel Chan Date: Sun, 11 Feb 2024 22:31:20 -0500 Subject: [PATCH] update conditionals --- 4_Conditionals.html | 141 ++++++++++++++------------------------------ 1 file changed, 44 insertions(+), 97 deletions(-) diff --git a/4_Conditionals.html b/4_Conditionals.html index d913855..bb1702f 100644 --- a/4_Conditionals.html +++ b/4_Conditionals.html @@ -688,14 +688,13 @@

What are conditionals and why do we care about them?A set of pictures might help to give the intuition:

_images/conditional-pictures.png

Basically anytime you find yourself at a problem step or part of your problem where you say something like “do something based on / depending on / looking at / if some condition”, that is a signal that you need a conditional.

-

Let’s brainstorm some real-world examples together!

+

Here are some examples:

+

What are some other real-world examples of this sort of situation that you can think of?

Anatomy of a basic conditional block in Python#

@@ -803,7 +802,7 @@

A closer look at Boolean expressions

Boolean Operators#

-

We use Boolean Operators to compare TWO pieces of data. When evaluated, they yield a Boolean value (True or False).

+

We use Boolean Operators to compare TWO pieces of data. When evaluated, they yield a Boolean value (True or False).

data1 booleanOperator data2

Here are the main ones: