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

# Call the subtraction function
subtraction(4, 10)

desired output:

10 minus 4 equals 6

Answers

Answer 1

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

4 minus 10 equals -6

Which is different from the expected output of

10 minus 4 equals 6

Modify

solution = minuend-subtrahend

to

solution = subtrahend  - minuend

And that does it.


Related Questions

What is 3+5?*

(Hint: is it not 8)

Answers

Such a confusing question:)

Explanation:

mark me brainliest

explain the advantage and disadvantage of using css.​

Answers

Explanation:

When discussing the advantage/dis- of CSS, its important to note the two types of CSS

Inline and External CSS.

Inline CSS allows for on the spot changing of the style of whatever.

External CSS allows for site wide changes to the style of whatever.

When it comes to UX, External CSS creates a longer load time of the webpage, especially if there's a large amount of styles for things.

Inline CSS causes problems when you want Javascript oriented design as Javascript overwrites Inline. when coded in a specific way.

You are a Network administrator for a company whose IP address is 199.199.10.0/24. Your company has two departments. Research needs 13 hosts and Marketing needs 31 hosts. Using VLSM; what is the network address of the second subnet?

Answers

Answer:

Explanation:

VLSM is Variable Fixed Length Subnet Mask which  creates subnets with varying sizes with a variable number of hosts.

Arrange the different subnets with descending number of hosts required. So the first subnet will be for Marketing and the second will be for Research.  The second subnet will have the second higher IP available which is 199.199.10.0/26. It has 64 IP addresses that can be assigned to 13 hosts required by Research.

A common technique for masking contents of messages or other information traffic so that opponents can not extract the information from the message is __________ . Group of answer choices analysis integrity masquerade encryption

Answers

hello!

the answer is encryption!

i hope this helps! :]

Use the drop-down menu to identify which command is used to do the activities.

Saving updates on a workbook:

Saving a workbook on OneDrive:

Changing the file name of an existing workbook:

Saving an existing workbook in a different location:

Assigning an initial location for the workbook to be saved:

Answers

Answer:

1. Both

2. Save As

3. Save As

4. Save As

5. Both

Explanation:

got the question right

The value you choose—typically the display text—will be saved as the default “Dropdown list” data-type. Instead of saving the text, the “Dropdown list with published keys” instead saves the Revalue ID (from the database).

What is use of a drop-down menu to identify a command?

A drop-down menu, also known as a list of options, appears when a button or a piece of text is clicked. Users can decide a value from a list by selecting it from a graphical representation of this method.

People can select an item from a list you generate using drop-down menus. In a new worksheet, type the selections you want to appear in your drop-down list. Your list items should ideally be in an Excel table.

A closed-ended inquiry known as a dropdown allows respondents to select one response option from a set of options displayed in a dropdown menu.

Therefore, 1. Both 2. Save As 3. Save As 4. Save As 5. Both.

Learn more about drop-down here:

https://brainly.com/question/4379717

#SPJ2

Suppose Alice, Bob, and Carol want to use secret key technology to authenticate each other. If they all used the same secret key K, then Bob could impersonate Carol to Alicia (actually any of three can impersonate the other to the third). Suppose instead that each had their own secret key, so Alice uses KA, Bob uses KB, and Carol uses KC. This means that each one, to prove his/her identity, responds to a challenge with a function of his/her secret key and the challenge. Is this more secure than having them all use the same secret key K? (Hint: what does Alice need to know in order to verify Carol’s answer to Alice’s challenge?)

Answers

Answer:

No. This is not more secure.

Explanation:

this is not more secure than having all of Carol, bob and Alice having the same key.

alice would be able to know Carol's key for her to be able to verify the answer Carol gave to a challenge by her. she would also have to know bob's key to do the same.

any of these 3 would have to know someone else's secret key to verify answers to any challenge.

the challenge is to know the secret keys if the other two and if done, decryption can easily be done and they can impersonate.

One of the leading causes of serious injuries and deaths in this country is single-vehicle crashes into roadside obstacles and hazards.

True
False

Answers

Answer:

True

Explanation:

Just took the quiz on edginuity

Good luck

What will be displayed as a result of executing the following code?
int x = 6;
String msg = "I am enjoying this class.";
String msg1 = msg.toUpperCase();
String msg2 = msg.toLowerCase();
char ltr = msg.charAt(x);
int strSize = msg.length();
System.out.println(msg);
System.out.println(msg1);
System.out.println(msg2);
System.out.println("Character at index x = " +
ltr);
System.out.println("msg has " + strSize + "characters.");
A) I am enjoying this class. I AM ENJOYING THIS CLASS. i am enjoying this class. Character at index x = e msg has 24 characters.
B) I am enjoying this class. I AM ENJOYING THIS CLASS. i am enjoying this class. Character at index x = e msg has 25 characters.
C) I am enjoying this class. I AM ENJOYING THIS CLASS. i am enjoying this class. Character at index x = n msg has 24 characters.
D) I am enjoying this class. I AM ENJOYING THIS CLASS. i am enjoying this class. Character at index x = n
msg has 25characters.

Answers

Answer:

d

Explanation:

Should spreadsheets be used to track time worked at a job?

YES
NO

Answers

Answer:

Yes

Explanation:

Spreadsheets should be used to track time worked at a job because it would make it easier to use and see rather than another platform.

Three-dimensional models are constructed using two-
dimensional profiles.
True or false

Answers

Answer:

False.

It would be true for pyramids, but not true for other shapes, like spheres and cubes.

Benchmark test compare similar systems performing in which tasks
A) similar tasks
B) different tasks
C) related tasks
D)identical tasks

Answers

Benchmark test compare similar systems performing in identical tasks.

What is Benchmark in the act of  Performance Testing?

A Benchmark Testing is  known to be a kind of  metric or one that is used as a kind of point of reference against a software products or services and it is one that can be compared to know the quality feature.

This kind of test is one where there is a set standard that aid  one in knowing  the quality of software product or service. One  can benchmark a identical  product to know its quality.

Learn more about Benchmark test from

https://brainly.com/question/226804

What is a spreadsheet macro?

A) A small program which performs several steps, which can be recorded and activated using a hot key combination.

B) A tool used to create charts.

C) A feature inside excel that makes your work look better.

D) A formula to complete calculations.

Answers

Answer:

Macros are code that automate work in a program—they let you add your own tiny features and enhancements to help you accomplish exactly what you need to do, quickly with just a click of a button.

Explanation:

If you only use part of a quotation, it is not necessary to include a citation.

Answers

Answer:

i believe this is false

explanation:

The ideal gas law allows the calculation of volume of a gas given the pressure(P), amount of the gas (n), and the temperature (T). The equation is:

V = nRT / P

Since we only have used integer arithmetic, all numbers will be integer values with no decimal points. The constant R is 8.314 and will be specified as (8314/1000). This gives the same result.

Required:
Implement the ideal gas law program where the user is prompted for and enters values for n, T, and P, and V is calculated. Be careful to implement an accurate version of this program. Your program should include a proper and useful prompt for input, and print the results in a meaningful manner.

Answers

Answer:

Written in Python

P = float(input("Pressure: "))

T = float(input("Temperature: "))

n = float(input("Amount of Gas: "))

R = 8.314

V = (n * R * T)/P

print("Volume: "+str(round(V,2)))

Explanation:

The next 3 lines prompts user for inputs of Pressure, Temperature, Amount of Gas

P = float(input("Pressure: "))

T = float(input("Temperature: "))

n = float(input("Amount of Gas: "))

This line initializes constant R

R = 8.314

This line calculates volume

V = (n * R * T)/P

This line prints volume, rounded up to 2 decimal places

print("Volume: "+str(round(V,2)))

Momentous events in Philippine history where ICT played a huge role in making it a success?

Answers

Answer:

I hope this answer is correct

Explanation:

MANILA, Philippines – Sixteen years ago, Filipinos gathered at the historic thoroughfare EDSA, where freedom was once won against a dictator in 1986.

MANILA, Philippines – Sixteen years ago, Filipinos gathered at the historic thoroughfare EDSA, where freedom was once won against a dictator in 1986.EDSA People Power II, as it came to be known, was a series of protests held from January 16 to 20, 2001, against former president Joseph Estrada who was then facing plunder charges. The protests eventually triggered Estrada’s downfall – and paved the way for Gloria Macapagal-Arroyo, his vice president, to enter the spotlight in the political scene.

MANILA, Philippines – Sixteen years ago, Filipinos gathered at the historic thoroughfare EDSA, where freedom was once won against a dictator in 1986.EDSA People Power II, as it came to be known, was a series of protests held from January 16 to 20, 2001, against former president Joseph Estrada who was then facing plunder charges. The protests eventually triggered Estrada’s downfall – and paved the way for Gloria Macapagal-Arroyo, his vice president, to enter the spotlight in the political scene.But Arroyo would later face her own share of troubles during her administration. Both former presidents seemed to follow the same track in politics: they were both vice presidents before assuming the highest seat of the land, and both have been accused of criminal offenses. Despite these, Estrada and Arroyo have managed to retain positions in government today.

Hello World.

⇒ What is the function of for loops in Python?

Answers

Answer:

The for loop in Python is used to iterate over a sequence (list, tuple, string) or other iterable objects. Iterating over a sequence is called traversal.

✒Answer✒

The for loop in Python is used to iterate over a sequence (list, tuple, string) or other iterable objects. Iterating over a sequence is called traversal.

Explanation:

# Brainliest Bunch

HTML is at the core of every Web page, regardless the complexity of a site or number of technologies involved.

1. True

2. False

Answers

Answer:

1

Explanation:

That is true. Every website, no matter how complex, breaks down to basic HTML code and structure.

Write a C++ program to Calculate the value of π from the infinite series Print a table that shows the value of π approximated by computing the first 200,000 terms of this series. How many terms do you have to use before you first get a value that begins with 3.14159?

Answers

The C++ program is an illustration of loops and conditional statements

How to analyze the infinite series

The infinite series is given as:

[tex]\pi = 4 - \frac 43 + \frac 45 - \frac 47 + \frac 49 -\frac 4{11} + ....[/tex]

The above series shows that, the addition and the subtraction signs are interchanged, and the denominator of the fractions increase by 2 while the numerator remains the same

The main program

The program written in C++, where comments are used to explain each line is as follows:

#include <iostream>

using namespace std;

int main(){

   //This initializes the value of pi to 0

   double pi = 0;

   //This iterates from 1 to 200000

   for(int i = 0; i< 200000; i++){

       //The following conditions determine the value of pi

       if(i%2==0){

           pi+=4.0/(1.0+2.0*i);

       }

       else{

           pi-=4.0/(1.0+2.0*i);

       }

   }

   //This prints the value of pi

   cout<<pi;

   return 0;

}

Read more about loops and conditional statements at:

https://brainly.com/question/24833629

Kris Allen runs a pet daycare center. She needs to keep track of contact information for her customers, their animals, the services provided (such as walking and grooming), and the staff who are assigned to care for them. She also must send out invoices for payment each month. What features of spreadsheets and/or database software might she use to facilitate her business

Answers

for easy data management i recommend SQL

The features of spreadsheets and/or database software might she use to facilitate her business are:

Rows and columns in spreadsheet's can make her information to be neatly organized.The use of Formulas and functions.

What is Spreadsheet?

A spreadsheet is known to be a kind of computer application that is often used for computation, organization, and others.

Note that The features of spreadsheets and/or database software might she use to facilitate her business are:

Rows and columns in spreadsheet's can make her information to be neatly organized.The use of Formulas and functions.Data filteringAccounting.Analytics, etc.

Learn more about spreadsheets from

https://brainly.com/question/27119344?answeringSource=feedPublic%2FhomePage%2F20

#SPJ2

Your boss has asked you to create a program that calculates the total cost of an item
after a discount and sales tax have been applied. You have been testing the program
using a cost of $10.00, a discount of 50%, and 10% sales tax. You know the answer
should be $5.50 but the program returns $16.50. What type of error is most likely
causing the problem?

Answers

Answer:

Have you tried debugging the text? It shows the line by line process of the final answer

4. How many times will the print statement be executed within the following nested for loops? Briefly explain how or show the math to calculate that number of iterations.

for (int h = 1; h <= 12; h++) {
for (int m = 0; m <= 59; m++) {
for (int s = 0; s <= 59; s++) {
System.out.printf(“%d:%02d:%02d%n”, h, m, s);
}
}
}

Answers

Print statements are used to display outputs

The number of times the nested loop will be executed is 43200

What are nested for loops?

Nested for loops are loops that are placed within another loop or loops

From the statement, we have the following loop conditions:

h = 1; h <= 12, m = 0; m <= 59 and s = 0; s <= 59

The above means that:

h = 12 --- the outer loop will be executed 12 timesm = 60 --- the middle loop will be executed 60 timess = 60 --- the inner loop will be executed 60 times

So, the number of times the nested loop will be executed is:

[tex]Count = 12*60 *60[/tex]

[tex]Count = 43200[/tex]

Hence, the number of times the nested loop will be executed is 43200

Read more about loops at:

https://brainly.com/question/14284157

When an application checks for malware, it compares the contents of every file it looks at to this database of definitions and if it finds a match, it flags the file as potentially being infected.

1. True

2. False

Answers

When an application checks for malware, it compares the contents of every file it looks at to this database of definitions and if it finds a match, it flags the file as potentially being infected is a true statement.

What does anti-malware software look for?

A lot of programs are known to scan for malware through the use of a database that contains some known malware definitions

These definitions are used to tell what the malware does and how to know it. If the anti-malware program can be able to detects a file that matches the definition, it will then flag it as potential virus.

Learn more about application from

https://brainly.com/question/1538272

Submit your 300- word essay that: 1) identifies a problem in your community and works through problem solving steps to provide a solution, and 2) analyzes five conflicts through the conflict resolution approaches and explains an appropriate resolution for each conflict.

Answers

Note the above prompt is about a descriptive essay. See the sample essay below.

Descriptive Essay about a problem in my community and the Solution to the Same

Waste management is an issue that affects every community around the world. It is a problem that has far-reaching consequences on human health and the environment. In my community, waste management is an issue that requires immediate attention. The problem stems from a lack of awareness, inadequate infrastructure, and insufficient regulatory measures.

To address this problem, we can follow a problem-solving process.

The first step would be to define the problem, which is waste management. This would involve understanding the causes and effects of the problem.

The second step would be to gather data on the problem. This could be done through surveys, interviews, and observations.

The third step would be to analyze the data collected and identify the root causes of the problem. In our case, the root causes could be lack of awareness, inadequate infrastructure, and insufficient regulatory measures.

The fourth step would be to brainstorm solutions to the problem. This could be done through workshops, focus groups, and meetings. Some possible solutions could be to increase public awareness through education campaigns, improve waste collection and disposal infrastructure, and enforce stricter regulations on waste disposal.

The fifth and final step would be to implement and evaluate the solutions. This would involve monitoring and assessing the effectiveness of the solutions and making adjustments as necessary.

Conflicts are inevitable in any community, and it is essential to have effective conflict resolution approaches to ensure that these conflicts are resolved in a fair and equitable manner. The five conflict resolution approaches are negotiation, mediation, arbitration, litigation, and avoidance.

Negotiation is a conflict resolution approach that involves parties coming to an agreement through discussion and compromise. This approach would be appropriate for conflicts that are relatively minor and do not involve legal or ethical issues.

Mediation is a conflict resolution approach that involves a neutral third party facilitating a discussion between the conflicting parties to come to an agreement. This approach would be appropriate for conflicts that involve communication breakdowns or misunderstandings.

Arbitration is a conflict resolution approach that involves a third party making a binding decision on the conflict. This approach would be appropriate for conflicts that involve legal issues.

Litigation is a conflict resolution approach that involves taking the conflict to court to have a judge make a binding decision. This approach would be appropriate for conflicts that involve legal or ethical issues.

Avoidance is a conflict resolution approach that involves ignoring or avoiding the conflict altogether. This approach is generally not recommended as it does not resolve the conflict and can lead to further problems in the future.

In conclusion, waste management is a problem that requires a concerted effort from everyone in the community to address. Through problem-solving steps, we can identify the root causes of the problem and come up with effective solutions. Note as well that, having effective conflict resolution approaches is essential in ensuring that conflicts in the community are resolved in a fair and equitable manner. By following these approaches, we can work towards creating a more sustainable and harmonious community.

Learn more about Descriptive Essay at:

https://brainly.com/question/25505941

#SPJ1

Which is the "Network Effect?"

Answers

Answer:

The network effect refers to the concept that the value of a product or service increases when the number of people who use that product or service increases.

Explanation:

Hope this helps !!

Alejandro wants to post an animation on his social media page that shows a series of slightly different images displayed in sequence. What type of animation should he select?

A.) Animated gif
B.) HTML 5
C.) Adobe Flash
D.) Adobe animate cc

Answers

Answer:

Adobe Flash

Explanation:

From the list of given options, Adobe Flash answers the question.

Adobe Flash are basically multimedia animations that are created to include numerous images which are displayed in sequence.

Other options such as Adobe animation cc is a software used to create flash animations, html5 is a web language, animated GIF are short animations.

The type of animation he  should select is A.) Animated gif

Animated gif are picture which are in Graphic interchange format (GIF) .

Animated gif  are very easy to download because they download quickly.

Animated gif are picture that always move non stop when displayed  on a computer screen or other device as the picture changes from one picture to another picture.

They can always be found on the internet and they are mostly used as an advertisement pictures that is embedded on web pages which help to showcase a company product.

Inconclusion The type of animation he  should select is A.) Animated gif.

Learn more about Animated gif here:

 https://brainly.com/question/15057611

1.Give single word
a. A computer never gets tired or bored while working for a long time ..........
b. A computer doesn't make any mistake ..........
c. A computer can perform billions of calculations in a second .........
d. A computer can perferm several tasks such as drawing pictures,playing games,etc.......

Answers

Answer:

A. Versatile

B. Accuracy

C. High speed

D. Animation.

How does Accenture work to build trust in Artificial Intelligence (AI)?

Answers

This question has already been asked on Brainly.

https://brainly.in/question/35275070

Accenture work to build trust in Artificial Intelligence (AI) through investing in differentiated intellectual property.

What is a  differentiated intellectual property?

Intellectual property serves as a creations of the mind as well as inventions that is bee used in commerce.

With the creation of this  differentiated intellectual property, it help the Accenture to be able to establish trust because there is a law that protect any intellectual property in the the country.

Read more on intellectual property here: https://brainly.com/question/1078532

#SPJ2

Which should be your first choice for the most efficient and successful job search method?

visiting a career center

performing an online search

networking person-to-person

checking newspapers and other publications

Answers

Answer:

C

Explanation: Source: trust me bro

Answer:

C

Explanation: Edge 2022

3
User input is required in an iterative program.

A.
True

B.
False

Answers

Answer:

B

Explanation:

An iterative program could work with or without user input. It really just depends on the type of program you're creating. Hope this helps.

Complete the sentence. Privacy of means that our data should not be automatically available to others.

Answers

The term Privacy means that our data should not be automatically available to others and there should be a measure of restriction for people in accessing it.

What is privacy of data?

Data privacy is known to be the right of  people to have control over how their personal information as to when or if it can be collected or used.

Data protection is known to be part of privacy. This is due to the fact that protecting user data and sensitive information is a initial step to keeping user data private.

Learn more about Privacy of means from

https://brainly.com/question/1189272

Other Questions
Hello people ~In maize, a meiocyte has 20 chromosomes. What will be the number of chromosomes in its somatic cell?(a) 40(b) 30(c) 20(d) 10 2. What is the theory of inflation? How does it provide evidence for themultiverse? The chart below shows how cups of lemonade Marcia sold each hour she had her lemonade stand set up. Marcia charged 35 cents for each cup of lemonade, how much money did she make in the four hours? As part of a survey, 75 people were asked to name their favorite sport. The results showed that 25 of the people named basketball as their favorite sport. What percentage of the people in the survey named basketball as their favorite sport?A. 33 1/3 %B. 20%C. 50%D. 66 2/3% Ahmad runs 7 miles in 80 minutes. At the same rate, how many miles would he run in 64 minutes? A number of compounds containing the heavier noble gases, and especially xenon, have been prepared. One of these is xenon hexafluoride (XeF6), which can be prepared by heating a mixture of xenon and fluorine gases. XeF6 is a white crystalline solid at room temperature and melts at about 325 K. A mixture of 0.0600 g of Xe and 0.0310 g of F2 is sealed into a 100.0-mL bulb. The bulb contains no air or other gases. The bulb is heated, and the reaction above goes to completion. Then, the sealed bulb is cooled back to 20.0C. What will be the final pressure in the bulb, expressed in torr? Who has the power to introduce a bill to the legislative branch during the lawmaking process?any state governora member of Congressany citizen of the nationthe president of the US A small object with mass m, charge q, and initial speed v0 = 5.00 * 103 m>s is projected into a uniform electric field between two parallel metal plates of length 26.0 cm (Fig. P21.78). The electric field between the plates is directed downward and has magnitude E = 800 N>C. Assume that the field is zero outside the region between the plates. The separation between the plates is large enough for the object to pass between the plates without hitting the lower plate. After passing through the field region, the object is deflected downward a vertical distance d = 1.25 cm from its original direction of motion and reaches a collecting plate that is 56.0 cm from the edge of the parallel plates. Ignore gravity and air resistance. Calculate the objects charge-to-mass ratio, q>m Read the excerpt from We Shall Not Be Moved. Esther Lobetkin, a recent immigrant, became chairman of her Yiddish-speaking group, marching with the strikers by day, then rushing to Clinton Hall to report and attend meetings until the small hours of the morning. A sandwich at midnight and an hour of sleep were all she seemed to need. Although she was arrested time and again, she never failed to yell from the back of the patrol wagon, "Do not lose courage! We'll win yet!" Which best states the author's purpose for naming and describing Esther Lobetkin in the text? 2.4.9 practice spoken assignment In terms of your speech and presentation, what are stories not? A. Stories dont have to be funny. B. They dont have to be worthy of winning a Pulitzer Prize. C. They dont have to be about famous people or based in well-known places. D. All of the above why do we have so much dna? Write an expression using fractions to show how to determine the amount that each person will pay. Then calculate each person's contributions showing all steps in long division.My chartPayton:$24.8Lexi:$23.96Chelsee:$14.9Maya:$21.91 Number of object in orbit , example cause and effect ? The Concept of culture? Explain why you think the Mauryan Empire fell apart so quickly after the death of Ashoka the Great. what is the length of bc? Which issue did the democratic party support following the presidential campaign of andrew jackson?. A sprinter ran a race in 11 seconds. What is the domain of this graph? What is the slope of the line that passes through (-2, 7) and (4.9)? Type a numerical answer in the space provided. Ifnecessary, use the key for a fraction bar. Do not include spaces in your answer.