0 of 6 problems solved • 0%

Composing Functions

6 exercisesEasy

Small functions are easier to check in isolation. Keep local work inside a helper and use its return value where a larger calculation needs it.

def square(number): return number * number def sum_squares(a, b): return square(a) + square(b)