Skip to content

Commit

Permalink
Merge pull request #1069 from fiveop/syntax_error_multiple_statements
Browse files Browse the repository at this point in the history
Inform instructors about potential syntax error
  • Loading branch information
ineelhere authored Nov 12, 2023
2 parents d875f2f + b2527c6 commit 082631c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions episodes/07-cond.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ runs only when certain conditions are true.

We can ask Python to take different actions, depending on a condition, with an `if` statement:

::::::::::::::::::::::::::::::::::::::: instructor

The following example will lead to a syntax error in the Python prompt, as it seems to expect exactly one top-level statement per invocation.
Removing `print('done')` from the example will fix the problem.

IPython executes the example from a single prompt without throwing an error.

::::::::::::::::::::::::::::::::::::::::::::::::::

```python
num = 37
if num > 100:
Expand Down

0 comments on commit 082631c

Please sign in to comment.