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]
2 years ago
14

In python 3.17 LAB: Convert to dollars

Computers and Technology
1 answer:
krok68 [10]2 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
Write a family database program. Create a class to represent a person and to store references to the person’s mother, father, an
Gennadij [26K]

Do you go to BASIS?

Sorry I don't have an answer for you, but we have the same assignment in our AP Comp sci class.

Just wondering.

8 0
2 years ago
Based on your prior knowledge, match each civilization to the region it occupied.<br>​
zhannawk [14.2K]

Answer: Inca- South America

Aztec - Meso America

Explanation:

7 0
3 years ago
What is the best approach to testing a website
Ronch [10]

A vital part of any website project is the quality assurance stage. Prior to launch, final QA testing ensures that your site is working according to your expectations and that your site users won’t be frustrated with any non-functioning pages.

7 0
3 years ago
The _ and _ services help us to keep in touch with our family and friends<br><br>​
alexira [117]

Answer:

Internet and communication technology

5 0
3 years ago
May someone do this please? Thanks!!
vovangra [49]

Answer:Jeez

Explanation: thats a lot

5 0
2 years ago
Other questions:
  • You receive a file named Project4.xlsx as an attachment to an email message. What do you expect the file to contain?
    8·1 answer
  • For this lab you will do 2 things:
    14·1 answer
  • Consider the problem of solving two 8-puzzles.
    10·1 answer
  • Which of the following is true about sorting functions?
    14·1 answer
  • This is pixlr
    6·1 answer
  • Consider Statement 1: All prime numbers greater than 3 are equal to a multiple of six, plus 1 or minus 1. Let P(x) be the statem
    7·1 answer
  • Until 2015, each new Roblox user automatically had one friend. What was he called?
    12·2 answers
  • Most network behavior analysis system sensors can be deployed in __________ mode only, using the same connection methods as netw
    8·1 answer
  • When you call a method with a parameter list, the arguments in the argument list Select one: a. must be coded in the same sequen
    15·1 answer
  • An instruction for the computer. Many commands put together to
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!