Give an example of defining and calling functions.
Create a function that prints the sum of two numbers and divides the sum by 5. The result should be float.
1
Expert's answer
2021-06-02T07:49:42-0400
#Defining function
def sum_div(x,y):
#calculating and printing sum
sum = x + y
print("Sum is:",sum)
#Calculating division
div=sum/5
print("Quotient is:",div)
#Calling function
sum_div(400,5)
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment