Please enable JavaScript to use CodeHS

AP Computer Science Principles in Python

Functions and Parameters

Students learn how to write reusable code with functions and parameters.

Lessons

5.1 Functions and Parameters 1

  • Functions and Parameters 1
  • Functions and Parameters Quiz 1
  • Double Number
  • Square
  • Triple
  • +2 more

5.2 Functions and Parameters 2

  • Functions and Parameters 2
  • Functions and Parameters Quiz 2
  • Sum Function
  • Area of Triangle
  • Height in Meters
  • +1 more

5.3 Functions and Parameters 3

  • Functions and Parameters 3
  • Functions and Parameters Quiz 3
  • Draw Circles
  • Horizontal Lines
  • Graphics Stop Light
  • +2 more

5.4 Functions and Return Values 1

  • Functions and Return Values 1
  • Functions and Return Values 1 Quiz
  • Double Number
  • Square with Return Values
  • Quadruple with Return Values

5.5 Functions and Return Values 2

  • Functions and Return Values 2
  • Functions and Return Values Quiz 2
  • Return Values
  • Is It Even?
  • Minimum of Two Numbers
  • +2 more

5.6 Local Variables and Scope

  • Local Variables and Scope
  • Local Variables and Scope Quiz
  • Return Values
  • Local Variables
  • Scope Trace
  • +2 more

5.7 Exceptions

  • Exceptions
  • Exceptions Quiz
  • Enter a Number
  • Enter Name and Age
  • Temperature Converter
  • +2 more

5.8 Python vs Karel

  • Python vs Karel
  • Making Karel's World
  • Making Karel Turn Left
  • Making Karel Turn Right
  • Making Karel Move
  • +4 more

5.9 Functions and the AP Create Task

  • Procedures, Parameters, and the AP Create Task Algorithm
  • AP Create Task Vocabulary Quiz
  • Guessing Game
  • Fortune Teller
  • Fortune Teller: AP Create Task Reflection
  • +1 more

5.10 Functions and Parameters Quiz

  • AP Pseudocode: Procedures
  • Create PT: Procedure Requirements
  • Functions and Parameters Quiz

Courses that include this module