Created
March 19, 2020 17:12
-
-
Save avielb/079981384aa2f7249bf6ceba54b73cbd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# define a function that it's input is 2 variables | |
# the function will return the sum of two numbers | |
def add_numbers(first_number, second_number): | |
return first_number + second_number | |
# input for two numbers, we will ask for input and cast the numbers | |
x = int(input("enter first number: ")) | |
y = int(input("enter second number: ")) | |
# get result of adding the two numbers | |
result = add_numbers(x, y) | |
# print the result | |
print("addition result is: " + str(result)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment