Exercise: Sum Of Two Numbers
Leer en Español | Solve Online
Background/Motivation
Addition is one of the most fundamental operations in arithmetic and computer science. It's the building block for more complex operations like multiplication and advanced algorithms. In this exercise, you'll learn how to work with numeric arguments and return values.
The Task
Write a function sum_two_numbers(a, b) that takes two integers as input and returns their sum.
Specifications
- Function Name:
sum_two_numbers - Arguments:
a(int): The first number.b(int): The second number.
- Return Value:
int: The sum ofaandb.
Constraints
- The numbers can be positive, negative, or zero.
- The numbers will be within the range of a standard integer.
Example
Instructions
- Open
exercises/sum_two_numbers/solution.py. - Implement the function.
- Change
SUBMIT = FalsetoSUBMIT = Truewhen ready. - Run
python solution.pyto verify with built-in self-tests.