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
klasskru [66]
3 years ago
14

In python 3.17 LAB: Convert to dollars

Computers and Technology
1 answer:
krok68 [10]3 years ago
7 0

To convert the inputs to dollars and cents, we make use of a combination of multiplication and addition.

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

<em />

<em>#This gets input for the number of quarters</em>

quarters = int(input("Quarters: "))

<em>#This gets input for the number of dimes</em>

dimes = int(input("Dimes: "))

<em>#This gets input for the number of nickels</em>

nickels= int(input("Nickels: "))

<em>#This gets input for the number of pennies</em>

pennies= int(input("Pennies: "))

<em>#This converts the amount to dollars and cents</em>

dollars = quarters * 0.25 + dimes * 0.10 + nickels * 0.05 + pennies * 0.01

<em>#This prints the amount to 2 decimal places</em>

print("Amount ${:.2f}".format(dollars))

Read more about Python programs at:

brainly.com/question/22841107

You might be interested in
Suppose that we are developing a new version of the AMD Barcelona processor with a 4 GHz clock rate. We have added some addition
bixtya [17]

Question:

Barcelona has an instruction count of 2.389E12, an execution time of 750 s, and a  reference time of 9650 s.

Answer:

New CPI is 1.379

Explanation:

Given:

Clock Rate=4 GHz

Reduction in number of instructions=15%

Execution time=700 sec

Instruction Count=2.389*10^{12}

Find:

New CPI=?

Solution:

Cycle Time=1/Clock Rate

Cycle\ Time= 0.25*10^{-9} sec

Execution Time= Clock cycles * Cycle Time

Clock Cycles=Execution Time/Cycle Time

Clock Cycles=\frac{700}{0.25*10^{-9}}

Clock\ Cycles= 2.8*10^{12}

New Instruction Count=2.389*10^{12}*0.85

New Instruction Count=2.03*10^{12}

CPI=\frac{Clock\ Cycles}{New\ Instructions} \\CPI=\frac{2.8*10^{12}}{2.03*10^{12}} \\CPI= 1.379

New CPI is 1.379

6 0
3 years ago
Explain in two or three sentences why health science careers are among the fastest growing careers in
il63 [147K]

Answer:

The growing concern of health science professionals and their limited number has caused students to opt for the courses in the U.S.

Explanation:

Health science professions account for more than half of the top twenty major growing occupations worldwide. According to the survey in 2018, it was estimated that by 2020 the United States would need around six million additional healthcare employees. And in the present scenario of the Coronavirus pandemic, it has been increased incredibly.  And therefore more educational institutes are providing programs to assist students to prepare for health science careers.

3 0
3 years ago
What is the purpose of a search engine?
soldi70 [24.7K]
The purpose is to look for the topic that you need to ask a question and to find/get to a website you want to go to. hope this helped :)
4 0
4 years ago
Read 2 more answers
Write a method public static ArrayList merge(ArrayList a, ArrayList b) that merges two array lists, alternating elements from bo
bogdanovich [222]
The answer would be 798 since all of them combined with the square root dividing it would give you that.
4 0
4 years ago
People must use Telepresence when Virtually meeting with a group of coworkers true or false
Norma-Jean [14]
I believe the answer is false
7 0
4 years ago
Other questions:
  • Email applications can either be local email client programs or web-based applications. Which application is an example of a loc
    13·2 answers
  • What is the most efficient way to include a space after each paragraph?
    13·2 answers
  • How do I only give 5 points and not 10?
    7·1 answer
  • When subscripts are used to specify character positions in a string the first character subscript is 0?
    5·1 answer
  • Consider the following code.
    10·1 answer
  • If you want three vertical sections of text on your page, create _____. dividers columns page breaks bulleted lists
    7·2 answers
  • What are some options available when you click File and then Print? (Multiple Choice)
    5·1 answer
  • I'm lonely every 14 and up come talk
    5·2 answers
  • Which footing supports a long brick or concrete wall<br>​
    14·1 answer
  • Write a python program to change variable value of your previous result percentage to your current percentage of mid-term
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!