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
What is best for a busy student to do for better results in school?
vlada-n [284]

Answer:

Manage time and stress

Explanation:

This is obvious

4 0
3 years ago
Read 2 more answers
Fill in the blank with the correct response.
harina [27]

Answer:

program

Explanation:

6 0
3 years ago
What is the digital divide? What does the digital divide mean for the world?
Luda [366]

it mean for some people that have technology like a computer and there are some who don't have access to technology like phones, and tv's

8 0
3 years ago
Which kind of file would be hurt most by lossy compression algorithm
Eduardwww [97]

Answer: an audio file containing speech

Explanation:

8 0
3 years ago
Read 2 more answers
Please answer no files !!
Pachacha [2.7K]

Answer:

im not exactly sure but i think its c

Explanation:

8 0
3 years ago
Other questions:
  • Universal Containers is setting up an external Business Intelligence (BI) system and wants to extract 1,000,000 Contact records.
    11·1 answer
  • By default, the windows desktop display
    12·1 answer
  • Scenes that are shot outside are known as
    9·1 answer
  • The Zoom slider will allow users to _____.
    5·2 answers
  • When should recursion be avoided?
    9·1 answer
  • A direct-mapped cache holds 64KB of useful data (not including tag or control bits). Assuming that the block size is 32-byte and
    14·1 answer
  • 4. In paragraph 7, what is the meaning of the phrase "not
    13·1 answer
  • Kelly wants to change the text in a cell so that it is centered instead of left-aligned, where should she look to make this
    8·1 answer
  • Explain what a datalist element does and is used for.
    12·1 answer
  • How to give a brainiest on a question? if you teach me i will give brainiest
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!