1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
tia_tia [17]
3 years ago
7

Here we have a program which is calling the subtract function to calculate the difference between two numbers. The value from th

e 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,"equals",solution)

# Call the subtraction function
subtraction(4, 10)

desired output:

10 minus 4 equals 6
Computers and Technology
1 answer:
statuscvo [17]3 years ago
8 0

Answer:

See explanation

Explanation:

Given

The above program that subtracts two numbers and returns the result

Required

Modify the source code to run perfectly

When the given program is tested, it displays

<em>4 minus 10 equals -6 </em>

<em></em>

<em>Which is different from the expected output of</em>

<em>10 minus 4 equals 6 </em>

<em></em>

Modify

<em>solution = minuend-subtrahend </em>

<em>to</em>

<em>solution = subtrahend  - minuend</em>

<em></em>

And that does it.

You might be interested in
Explain how using assistive technology can promote healthy emotional and social development. Discuss how you think young childre
adoni [48]

Assistive technology can promote healthy emotional and social development by catering the needs of young children and teens in a faster and easier way when used correctly. When they reach into adulthood, it will be easier for them to access things because they are used to it.

4 0
4 years ago
What feature of a computer program allows it to function on various platforms?
xxTIMURxx [149]
Cross-platform, i believe thats your answer

if this is correct please mark as brainliest.

3 0
3 years ago
Read 2 more answers
What information management (IM) activity is normally a theater-level decision because of its significant second order effects,
Alekssandra [29.7K]

determination of the networks, databases, and software applications

7 0
4 years ago
Select the correct answer.
tia_tia [17]

Answer:

A

Explanation:

HTML is a coding language.

8 0
3 years ago
A network administrator for a small company is contemplating how to scale the network over the next three years to accommodate p
Sphinxa [80]

Answer:

1.Documentation of the current physical and logical topologies

2. Analysis of the network traffic based on protocols, applications, and  services used on the network

3. inventory of the devices that are currently used on the network

Explanation:

When planning for network growth, it is important to have sufficient information about the existing network to find the best way to scale it up. This includes; documentation of the current physical and logical topologies, which shows how different devices are connected, including all connecting cables while the logical topology shows connectivity from the user's perspective, for example, which user is connected to which server. Application-based analysis of the network traffic will ensure the proper configuration of different protocols for seamless data flow in the case of adding more users to the network. Inventory of devices used on the network will include the number of switches, routers, firewalls, servers, computers this information will give insight on how many compatible devices can be added to expand the network.

7 0
3 years ago
Other questions:
  • #Imagine you're writing a program to check if a person is
    8·1 answer
  • ___ refers to all aspects of managing and processing information using computers and computer networks
    13·1 answer
  • A security system uses sensors at every door and window which will set off an alarm if any one of them is opened. There is also
    13·1 answer
  • In a bubble sort, you use a(n) ____ loop to make pair comparisons.
    5·1 answer
  • Which of the following statements is true?
    11·1 answer
  • Which type of evidence should victims collect to help officials catch cyber bullies
    9·2 answers
  • Why are new versions of applications packages released often ​
    9·1 answer
  • 2 2.2.4 Quiz: Setting Up a Business Letter
    9·1 answer
  • PAGE<br>DATE<br>0 What types of information should be there internet?​
    5·1 answer
  • There is one clear definition of IT. True False
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!