The price of an item you want to buy is given in dollars and cents. You pay for it in cash by giving the clerk d dollars and c cents. Write specifications for a function that computes the change, if any, that you should receive. Include a statement of purpose, the preconditions and postconditions, and a description of the arguments.

Answers

Answer 1

Answer:

Get the actual price of the item and convert it to cents, also get and convert the amount paid to cents.

subtract the actual price of the item from the paid amount ( which is in cents), if the result is greater than zero, covert the result back to dollars and output the result.

Explanation:

The program converts the actual price of the item and the amount paid to cents (where a dollar is equal to 100 cents). The variables are subtracted to get the change to be refunded, the result is converted back to dollars as the actual change to be paid.


Related Questions

An employer uses the spreadsheet below to determine the average hourly salary of her four employees. She begins by determining the hourly salary of each person and displaying that in column D. Which formula can she then use to determine the average hourly salary?



=average(D2:D5)

=average(B2:B5)

=average(C2:C5)

=average(B5:D5)

A. =average (D2:D5)

Answers

Answer:

The answer is "=average(D2:D5)"

Explanation:

 In Excel, the AVERAGE function is used to measures the average number, in the arithmetic average.This method is used as the group of numbers, that determines by using the AVERAGE function. This feature is an AVERAGE, which is used to ignores the logical data, empty columns, or text cell. It is up to 255 specific arguments, that could be handled by AVERAGE, including numbers, numerical values, sets, arrays, or constant.

Answer:

A

Explanation:


What is an example of a free online library?
A. Duck Duck Go
B. Project Gutenberg
C. Bing
D. PubMed

Answers

The answer is b
Hope it helps



B project GUTENBERG!!!!!!
:) brainliest?

which option enable you to change the background colour of a slide​

Answers

Explanation:

In order to change the background color in Microsoft PowerPoint 2010 we need to go to View and Slide Master. Then, right click on the first slide and click Format Background. Then you can access the background options, including a way to change the background gradient effect or use a solid background color.

Which of the following is true of operations within a spreadsheet program’s built-in functions?
Operations within parentheses, then multiplication and division, and then addition and subtraction are computed.
Operations within parentheses, then addition and subtraction, and then multiplication and division are computed.
Multiplication and division, then addition and subtraction, and then operations within parentheses are computed.
Addition and subtraction, then multiplication and division, and then operations within parentheses are computed

A. Operations within parentheses, then multiplication and division, and then addition and subtraction are computed.

Answers

Answer:

a is the answer

Explanation:

Cards in a pack are black or red in the ratio
black: red = 2 : 5
What fraction of the cards are red?​

Answers

Answer:

[tex]Fraction = \frac{5}{7}[/tex]

Explanation:

Given

[tex]black: red = 2 : 5[/tex]

Required

Determine the fraction of red

First, we calculate the total ratio.

[tex]Total = black + red[/tex]

Substitute values for black and red

[tex]Total = 2 + 5[/tex]

[tex]Total = 7[/tex]

The fraction of red is then calculated as:

[tex]Fraction = \frac{Red}{Total}[/tex]

[tex]Fraction = \frac{5}{7}[/tex]


You use utility software to
Select all that apply

Answers

to help analyze, configure, optimize or maintain a computer. Utility software usually focuses on how the computer infrastructure (including the computer hardware, operating system, software and data storage) operates.

From the demonstration video on navigating the Outlook interface, which of the following is true? Check all that apply.

Use the ALT key on the keyboard to toggle letter keys to activate functions in Outlook.
To get to the Backstage view, click on the File tab on the top left.
The Outlook icon can be found on the Task Bar in Windows by default.
The Message Pane is where you can read the body of the message.
The Reading Pane and the To-Do List can be toggled on and off as needed.

Answers

Answer:

A, B, and E.

Explanation:

I just did it!

You are responsible for several servers running Windows Server. You will be managing the log files on the servers. What should you use to work with the Windows log file

Answers

Incomplete question. The Options:

a. rsyslog

b. logrotate

c. /var/log

d. Event Viewer

Answer:

d. Event Viewer

Explanation:

Among all the listed options, only the Event Viewer application is specifically designed to log files on Windows servers. While rsyslog, logrotate, and  /var.log are designed for the Linux operating system environment.

Some of the common log files to be found on the Event Viewer application include;

log of applications opened,system errors, security warnings.

Answer:

its d

Explanation: there no need

Write a program that inputs a text file. The program should print the unique words in the file in alphabetical order. Uppercase words should take precedence over lowercase words. For example, 'Z' comes before 'a'.

Answers

Answer:

unique = []

with open("file_name.txt", "r") as file:

   lines = file.readlines()

   for line in lines:

       # assuming comma is the only delimiter in the file

       words = line.split()

       for word in words:

           word = word.strip()

           if word not in unique:

               unique.append(word)

unique = sorted(unique)

print(unique)

Explanation:

The python module opens a file using the 'with' keyword (the file closes automatically at the end end of the indentation) and the open built-in function and reads the content of the open file as a list of lines of the content.

Each line is split into a list and the unique words are collected and stored in the unique list variable.

The program is an illustration of file manipulations.

File manipulation involves writing to and reading from a file

The program in Python where comments are used to explain each line is as follows:

#This creates an empty list

wordList = []

#This opens the file

with open("myFile.txt", "r") as file:

   #This reads the file, line by line

   lines = file.readlines()

   #This iterates through each line

   for line in lines:

       #This splits each line into words

       words = line.split()

       #This iterates through each word

       for word in words:

           #This removes the spaces in each word

           word = word.strip()

           #This adds unique words to the list

           if word not in wordList:

               wordList.append(word)

#This prints the unique words in alphabetical order

print(sorted(wordList))

Read more about similar programs at:

https://brainly.com/question/19652376

Sites on the surface web are _____.
A. freely available to all users

B. home pages only

C. older pages that have not been updated

D. member-only sites

Answers

It’s A because surface website’s are available for everybody but the dark web is opposite

It should be noted that Sites on the surface web are A. freely available to all users.

What is Surface Web?

The Surface Web can be regarded as a portion of the World Wide Web which is accessible for  general public and it can be  searched with standard web search engines.

Therefore, option A is correct.

Learn more about Surface Web at:

https://brainly.com/question/4460083

Other Questions
what is the authors purpose of "what the doctor ordered?" PLEASE HELP ASAP! BRAINLIEST TO CORRECT PROPER ANSWER!One goal the French and Spanish colonists had in common in the New World was Select one:a. developing the fur tradeb. establishing stable governmentsc. converting the Native Americansd. searching for gold and other precious metals Which of these prompts would require writing a persuasive essay? Round (R) is dominant over wrinkled (r) andGreen (Y) is dominant over (y) yellow. Cross thefollowing and express the phenotypic andgenotypic ratios. RrYy and rrYy A triangle has angle measurements 24 and 85. What is the measure of the remaining angle?Enter your answer in the box. 20 POINTS What does Charlotte imply when she says that Zachariah looks like "the very imp of death in search of souls"?She trusts him, despite appearances.She finds him dangerous and frightening.She believes what he says.She thinks he is unfairly treated. Narrative, informative, and argumentative are three differenttopics.outlines.reading audiences.essay formats. On a quiet day without many witnesses, a 4.5 ft victim was shot by a sniper that was in a tower 780 ft away. If the angle of elevation is 5 degrees from the victim, at what vertical distance did the sniper shoot from 1. Freon (CCl2F2) is commonly used in refrigerators and air conditioners as a coolant. How many grams of fluorine are there in the 2.00 lbs of Freon necessary for an air conditioner? (1 lb = 454 g) According to Source 1, which statements best explain the purpose of government?Select the three correct answers. Which weathering agent is most likely to carry large boulders long distances over long periods of time?A iceB WaterC WindD Gravity can u pls help me with this question QUESTION 8Some seventh-, and eighth-grade students.spend time atthe elementary school tutoring students. Of the studentswho tutor, 21 are seventh-graders and 18 areeighth-graders. What percent of the tutors areseventh-graders?A) 54%B) 46%C) 52%D) 21% There are numerous maximum security prisons or units within states prisons. How many federal supermax prisons are there? A. 3B. 1C. 0D. 2 Pls help Ill brainlest grades close today If you can explain and show me the answers that would be great! A box contains 5 chocolate chip cookies, 4 sugar and 6 oatmeal raisin. What is the probability of picking a chocolate chip cookie?1/91/32/212/3 In the play "Trifles" by Susan Glaspell. Why are the trifles important to the murder?Its my h/w and I need the evidence and motive. Plz help I need it all by 1-10-21 THANK YOU SO MUCH!!! Anyone know the answer ? How to put 1/25 as fraction simplified