diff --git a/website/content/02-introduction-to-python/110-control-statements-looping/40-break-continue.md b/website/content/02-introduction-to-python/110-control-statements-looping/40-break-continue.md index 173038b..a561127 100644 --- a/website/content/02-introduction-to-python/110-control-statements-looping/40-break-continue.md +++ b/website/content/02-introduction-to-python/110-control-statements-looping/40-break-continue.md @@ -19,6 +19,7 @@ The `break` statement will completely break out of the *current loop*, meaning i ```python +>>> names = ["Rose", "Max", "Nina", "Phillip"] >>> for name in names: ... print(f"Hello, {name}") ... if name == "Nina": @@ -119,6 +120,7 @@ Nina in outer loop You can also use `break` and `continue` in `while` loops. One common scenario is running a loop forever, until a certain condition is met. ```python +>>> count = 0 >>> while True: ... count += 1 ... if count == 5: @@ -148,4 +150,4 @@ Just like in functions, consider the `return` statement the hard kill-switch of Max Nina 'Found the special name' -``` \ No newline at end of file +```