Skip to content

Commit 6566a21

Browse files
committed
updating conditional statements notebook
1 parent b80502c commit 6566a21

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

notebooks/L3/conditional-statements.ipynb

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,14 @@
306306
"source": [
307307
"### Combining conditions\n",
308308
"\n",
309-
"We can also use `and` and `or` to have multiple conditions on boolean values."
309+
"We can also use `and` and `or` to combine multiple conditions on boolean values."
310310
]
311311
},
312312
{
313313
"cell_type": "markdown",
314314
"metadata": {},
315315
"source": [
316-
"| Operation |example | Description |\n",
316+
"| Keyword |example | Description |\n",
317317
"| --------- |--------- |------------------------------------- |\n",
318318
"| and | a and b | True if both a and b are True |\n",
319319
"| or | a or b | True if either a or b is True |"
@@ -326,7 +326,7 @@
326326
"outputs": [],
327327
"source": [
328328
"if (1 > 0) and (-1 > 0):\n",
329-
" print('Both parts are true')\n",
329+
" print('At least one part is not true')\n",
330330
"else:\n",
331331
" print('One part is not true')"
332332
]
@@ -341,6 +341,20 @@
341341
" print('At least one test is true')"
342342
]
343343
},
344+
{
345+
"cell_type": "markdown",
346+
"metadata": {},
347+
"source": [
348+
"How about two `False` values? Try out what happens if you connect two `False` expressions using the `and` keyword:"
349+
]
350+
},
351+
{
352+
"cell_type": "code",
353+
"execution_count": null,
354+
"metadata": {},
355+
"outputs": [],
356+
"source": []
357+
},
344358
{
345359
"cell_type": "markdown",
346360
"metadata": {},

0 commit comments

Comments
 (0)