Version 1.0
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user