Define a function that can compute the sum of two numbers

Question:

Define a function that can compute the sum of two numbers.

Hints:

  • Define a function with two numbers as arguments. You can compute the sum in the function and return the value.

Solution:

def SumFunction(number1, number2):
	return number1+number2

print SumFunction(1,2)
Code language: Python (python)

Leave a Comment