Please enable JavaScript to use CodeHS

Texas Computer Science I in Python

Functions and Exceptions

Students learn how their programs can be decomposed into smaller pieces that work together to solve a problem.

Lessons

7.1 Functions

  • Functions
  • Functions
  • Greeting
  • Extended Greeting
  • Weather

7.2 Functions and Parameters

  • Functions and Parameters
  • Functions and Parameters
  • Print a Value
  • Name and Age
  • Print Product
  • +6 more

7.3 Testing Your Programs

  • Program Testing
  • Test: Greetings
  • Test: Slope of a Line
  • Test: Draw Lots of Circles!
  • Testing Reflection

7.4 Namespaces in Functions

  • Namespaces in Functions
  • Namespaces in Functions
  • Functions and Variables
  • Variable Shadowing
  • The global Keyword
  • +5 more

7.5 Functions and Return Values

  • Functions and Return Values
  • Functions and Return Values
  • Return 10
  • Add One
  • Negate
  • +5 more

7.6 Recursion

  • Algorithms that Use Recursion
  • Decomposition with Recursion
  • Blastoff!
  • Task Checker
  • Treasure Hunt
  • +1 more

7.7 Introduction to Exceptions

  • Exceptions
  • Exceptions
  • Enter a Number
  • Enter Name and Age
  • Temperature Converter, Part 2
  • +4 more

7.8 Exception Propagation

  • Delegation and Propagation
  • Propagating Exceptions Quiz
  • Going Through the Levels
  • Library Book Checkout

7.9 Functions Quiz

  • Functions and Exceptions Quiz
  • Control Flow Badge

Courses that include this module