I used this link to help me do this mastery: https:/
It is also useful to read chapter 3 of the book “Think Python, How to Think Like a Computer Scientist”,
You can see an example of this in my #WSQ08. Here’s the code showing the function that i created
def osuma (num1,num2): #first you have to define your function, in this case it’s osuma with num1 and num 2 as parameters
suma=num1+num2 #This is what the function does… this line must be idented so the function can work properly
return suma #the return statement returns with a value from a function… this line must be idented so the function can work properly
num1 = int(input(“Give me a number: “))
num2 = int(input (“Give me another number: “))
su=osuma(num1,num2) #Here i called osuma function i defined in order for the variable to take the function’s value
print (“The sum of your numbers is”, su)
#mastery12 Creating python functions by Gilberto Rogel García is licensed under a Creative Commons Attribution 4.0 International License.