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
Why is it important to match the latencies fo the older modules to the newer modules?
zlopas [31]
It is important to match the latencies of the older modules to the newer modules because it is a requirement when you upgrade the modules in your computer. If the result of matching is that they are not the same, it can cause the computer to run slow and not run properly.



7 0
3 years ago
The mainframe computer are the ____ and most ____ computers..​
Fittoniya [83]

Answer:

Mainframe computer are the larger system computers and most expensive computer.

4 0
3 years ago
You buy a $3,500 car and finance it through the car dealer. the contract says if you are two months delinquent with your payment
photoshop1234 [79]
The car owner acquired his car because the car dealer offers him a financing credit services. It is part of the contract that the car owner should pay in monthly basis. It is a fact and part of the contract also that once the car owner failed to pay 2 months of his contribution, the car dealer will get his car back.
6 0
4 years ago
Which of the following Web sites would be MOST credible?
pentagon [3]
As of this problem together with the options presented with it, the most probable and the most likely answer for this would be A. a site associated with a local university.

An encyclopaedia site with many contributors can be prone to false information and made-up information. To add to it, some contributors might just be displaying the art of trolling over the internet and some might just be contributing just for the heck of it. A site run by a small, obscure publishing house can become more credible by becoming more renowned. A private site can either be good or bad, depending on the author that set it up. The most credible among the options would be a site associated with a local university.
6 0
3 years ago
Which of the following commands appears in the INSERT menu or tab?
loris [4]

Answer:

Table

Explanation:

3 0
3 years ago
Other questions:
  • In the 1960s, techniques were developed that allowed individuals to fool the phone system into providing free access to long dis
    14·1 answer
  • What do you think of explaining to young people, from high school, the legitimacy of copyright and the dangers they can run on t
    11·1 answer
  • Consider that an individual threat agent, like a hacker, can be a factor in more than one threat category. If a hacker breaks in
    5·1 answer
  • Print a countdown from n to 1 The function below takes one parameter: an integer (begin). Complete the function so that it print
    8·1 answer
  • Speed in a given direction is called
    12·2 answers
  • The File method lastModified() returns
    10·1 answer
  • Select the correct answer.
    9·1 answer
  • Mohammed’s parents learn that his classmates have begun sending him text messages making fun of his heritage. Mohammed says he’s
    5·2 answers
  • In the software development process, which review studies the software design before it is released for coding?
    7·1 answer
  • give the tightest asymptotic bounds you can for the following recurrences and provide a short explanation for your solution. you
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!