Dan Stanzione (TACC) (original author), Steve Lantz, Adam Brazier, Chris Myers
Cornell Center for Advanced Computing

Revisions: 5/2024, 7/2021, 8/2016, 10/2014, 2/2014, 3/2013, 6/2010 (original)

Like other programming languages, Python has three main categories of control flow that appear in programs:

  • Conditionals
  • Loops
  • Function calls

In this section, all three categories are briefly covered.

Objectives

After you complete this segment, you should be able to:

  • Understand and use indentation and scope in Python
  • Program with conditionals, loops and functional calls
  • Use exceptions to handle runtime errors
Prerequisites

This workshop assumes the reader has no prior exposure to Python. A working knowledge of UNIX/Linux and general programming concepts is assumed. The target audience is scientists and engineers using high performance computing systems who wish to boost their productivity through the use of Python.

 
©  |   Cornell University    |   Center for Advanced Computing    |   Copyright Statement    |   Inclusivity Statement