Sum of Two Numbers

Write a Python function named add_two_numbers that accepts two integers as arguments and returns their sum.

Example 1:

Input: add_two_numbers(3, 2) 
Output: 5

Example 2:

Input: add_two_numbers(15, 35) 
Output: 50

Define a function that accepts two arguments and use the addition (+) operator to add them together.

def add_two_numbers(num1, num2):
    return num1 + num2

© Let’s Data Science

LOGIN

Unlock AI & Data Science treasures. Log in!