If you have a function that has to return a result, it may look like this:
def returnStuff():
x = 3
y = 10
return 13
If you are going to use this function, the statement should look like this:
myNewValue = returnStuff()If the function is going to use a parameter, it may look like this:
def returnStuff(x):
y = 10
return x + y
If you are going to use this function, the statement should look like this:
myNewValue = returnStuff(myOldValue)Write a program that uses three functions:
readValue() calculateValue()and
writeValue()
Use these three methods to read in 2 values, multiply them and print the original values and their product.