Skip to main content
Activity (Hands-On)Grades 9 - 11

What is Python?

Icon containing two snakes, one blue and one yellow, creating a ‘plus’ sign.Python is a high-level programming language that is very popular among new programmers.

Coding is a critical tool in most modern applications and can be a useful skill for engineers to apply in a variety of design settings. In this activity, students learn basic coding in Python, a high-level language that is known for its ease of use and various applications. They learn to make sense of basic programming structures such as variables, objects, classes, and instances, and programming concepts such as if-else statements, loops, and functions. In addition, within the discussion of Python syntax, students learn about operators (such as “=”) and their use in programming versus mathematics. After a brief lecture, students complete a Jupyter Notebook activity that will guide them through (1) using a Jupyter Notebook to run pre-written Python code and (2) plotting linear and quadratic functions and editing existing plots using Python code.

Engineers of all disciplines use Python code for plotting and manipulating data, machine learning, and much more. Most programmers, both beginner and advanced, prefer using Python to other languages because of its easier syntax and mass of libraries written for a variety of applications. If an engineer wants to apply some machine learning algorithm to examine some set of data they’re analyzing, they can perform a few internet searches to find (1) the library they need to use and (2) several tutorials for how to use the tools with their data.

After this activity, students should be able to:

  • Understand the basic capabilities of Python (if/else statements, loops, functions).
  • Use and edit Python code to plot basic functions in a Jupyter Notebook.
  • Use problem solving skills to write Python code to accomplish a simple task.

More Like This