Question: Using Python for this lab, well do basic example creating a function. This function should take two inputs. It should square the first input and
Using Python for this lab, well do basic example creating a function. This function should take two inputs. It should square the first input and then add the second input. It should then return that result.
Create this function. Then call it with the values 5 and 8.
Remember a function definition looks like this:
def func(a,b,c):
y = a + b # or whatever logic you want
z = y * c # or whatever logic you want
return z # to return the value z
And then call the function like this:
func(3,4,5)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
