Files
TactiTerm/src/challenges/005-functions.md
T
2026-07-21 22:24:25 +00:00

620 B

Challenge: Functions

Difficulty: Easy Language: Python Subject: Modular Programming (Functions)

Description

Write a function named add_numbers that takes two parameters, a and b, and returns their sum.

Requirements

  • Define the function add_numbers(a, b).
  • Use the return keyword.
  • Call the function and print the result of adding 5 and 10.

Hints

  • def add_numbers(a, b): is the standard way to define a function.
  • Use print(add_numbers(5, 10)) to see the result.

Validation

  • Check: python3 -c "import main; print(main.add_numbers(5, 10))"
  • Expected Output: 15