subject

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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:00
Which statement is true of web-based social media? a.they allow consumers to interact with and update content. b.they cannot be updated easily, as compared to print media. c.they are expensive to produce and maintain, as compared to print and television. d.they can exist independent of the internet.
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Afiling system in which an intermediary source of reference, such as a file card, must be consulted to locate specific files is called a(n) system. a. shelf filing b. direct filing c. indirect filing d. shingling
Answers: 1
question
Computers and Technology, 24.06.2019 02:00
How are we able to create photographs differently than 100 years ago? explain your answer in relation to your photograph you selected.
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Ais a built in formula in spread spread a is any math process such as addition or subtraction. options are function and operation
Answers: 1
You know the right answer?
Here we have a program which is calling the subtract function to calculate the difference between tw...
Questions
question
Mathematics, 17.10.2020 22:01
question
Mathematics, 17.10.2020 22:01
question
English, 17.10.2020 22:01
question
Mathematics, 17.10.2020 22:01
question
History, 17.10.2020 22:01
Questions on the website: 13722362