Please enable JavaScript to use CodeHS

Chapter 4

Functions and Exceptions

4.1 Functions


Define and Call a Function

Functions and Variables

Two Different X's

Extended Greeting

Check Your Understanding

  1. Invalid Answer

Exercise: Weather


Term Definition
Indentation Indentation is the visual structure of how your code is laid out. It uses tabs to organize code into a hierarchy.
Function body In Python functions, the function body is the indented block of code that comes after the `def my_function():` line. The function body is what will be executed when the function is called.