Python Exercises

Python Exercises#

This section provides exercises that align with the Python basics presented in this eBook. Code templates including README markdown files with instructions for the exercises are hosted in external repositories (visit Ecohydraulics and look for the Exercise- repositories).

The contents of the training include the design of reservoirs, calculation of flood return periods, simple hydraulic calculations, and sediment transport estimates. Every exercise starts with an explanation of the physical background of the applications.

The following table summarizes the practice application and the coding aspects featured in the exercises on the following pages:


Training goal

1d Hydraulics (Manning-Strickler solver)

loops, iterations, and functions

Reservoir design (Sequent Peak)

data handling with NumPy , communication with csv files

Flood return periods calculation

data and csv file handling with Pandas

1d sediment transport

Object Orientation and Classes, Workbook (xlsx) Handling, and plotting

Create a Graphical User Interface (GUI)

familiarize with Graphical User Interfaces (GUIs)