Skip to content

Commit

Permalink
Merge pull request #1001 from MYPei/extra-diagrams
Browse files Browse the repository at this point in the history
Extra diagrams for 07-cond.md

Hi @MYPei ,

Thank you for the pull request and contribution to the visual aspect of the lesson. We will merge your diagrams workflow with the main lesson.
  • Loading branch information
noatgnu authored Mar 21, 2023
2 parents 248c545 + 0500554 commit 3f8c0b8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions episodes/07-cond.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,14 @@ freeing us from having to manually examine every plot for features we've seen be
> > ## Solution
> > C gets printed because the first two conditions, `4 > 5` and `4 == 5`, are not true,
> > but `4 < 5` is true.
> > In this case only one of these conditions can be true for at a time, but in other
> > scenarios multiple `elif` conditions could be met. In these scenarios only the action
> > associated with the first true `elif` condition will occur, starting from the top of the
> > conditional section.
> > ![A flowchart diagram of a conditional section with multiple `elif` conditions and some possible outcomes.](../fig/python-else-if.png)
> > This contrasts with the case of multiple `if` statements, where every action can occur
> > as long as their condition is met.
> > ![A flowchart diagram of a conditional section with multiple `if` statements and some possible outcomes.](../fig/python-multi-if.png)
> {: .solution}
{: .challenge}
Expand Down
Binary file added fig/python-else-if.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fig/python-multi-if.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3f8c0b8

Please sign in to comment.