Computers and Technology

Here we have a program which is calling the subtract function to calculate the difference between two numbers. The value from the subtract function is being stored in a variable called answer. Then answer is being displayed. Code is not executing as expected. Instead of seeing the answer, we are seeing the word "None."
Modify the code within the subtract function so the value for solution is returned when the function is called. When you are finished, the output should Desired Output.

# Define the subtraction function
def subtraction(minuend, subtrahend):
solution = minuend-subtrahend
print(minuend,"minus",subtrahend,"e quals",solution)

# Call the subtraction function
subtraction(4, 10)

desired output:

10 minus 4 equals 6

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:30, silasjob09
Jenny wants to look at row 345 and compare it to row 17. what can she do if she wanted to easily adjust to see both at once?
Answers: 3
image
Computers and Technology, 22.06.2019 03:20, owoeli
Which of these is a benefit of social networking? oa. hiding your true identity from friendsob. avoiding talking to people in personoc. spending time with friends instead of studyingod. connecting with new people
Answers: 2
image
Computers and Technology, 22.06.2019 08:30, ajj3233
On the loan worksheet in cell c9 enter pmt function to calculate the monthly payment for the altamonte springs 2018 facilities loan. ensure that the function returns a positive value and set the reference to cells b5 and b6 as absolute references.
Answers: 2
image
Computers and Technology, 22.06.2019 16:30, mesposito
Technician a says that a dry sump system uses no oil storage sump under the engine. technician b says that a wet sump system uses no oil storage sump under the engine. who is correct?
Answers: 3
Do you know the correct answer?
Here we have a program which is calling the subtract function to calculate the difference between tw...

Questions in other subjects:

Konu
Mathematics, 08.12.2020 21:40
Konu
Mathematics, 08.12.2020 21:40
Konu
Social Studies, 08.12.2020 21:40
Konu
Mathematics, 08.12.2020 21:40