Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Example: Code sequencing

Bad: In the code below the function ball_height() first appears before it is defined. This code is confusing to read since when one first sees ball_height() it is not clear what it is and where it is coming from.

Bad code sequencing example

Also bad: The code below will work if one executes the bottom code cell before executing the top one, but anyone reading the report will do it in the opposite order, from top to bottom, and this will result in an execution error:

Another bad code sequencing example

Good: Code is entered sequentially and it is split into separate cells to better explain its purpose and structure.

Good code sequencing example