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
Jim wants to buy a car, he’ll probably only need it for a couple of years he has a short commute to work so he won’t put many mi
Papessa [141]
Is there more information? or options?
4 0
3 years ago
c programming Write code that prints: Ready! countNum ... 2 1 Go! Your code should contain a for loop. Print a newline after eac
olga_2 [115]

Answer:see explanation

Explanation:

Hello, from your question I see that you need a program which based on countNum's value prints ready then all the numbers to 1 and finally go!, I'd appreciate if you provided information about the numbers after the example you gave as I do not know if they are to be printed too.

The solution I provide includes the countdown to 1 printing newline after each number and text. Try it out!

#include <stdio.h>

int main(void)

{

   int countNum;

   int i;

   countNum = 22;

   for ( i = countNum; i > 0; i--) {

       if (i == countNum){

           printf("Ready!\n");

       }

       printf("%d\n",i);

   }

   printf("Go!\n");

   return 0;

}

6 0
3 years ago
What is the smallest group network
astra-53 [7]

LAN, MAN, MLAN, WAN, SAN, PAN ETC.

6 0
3 years ago
Electricity is the flow of in a conductor
Artyom0805 [142]
Electrons in a conductor
4 0
3 years ago
Read 2 more answers
On average, someone with a Bachelor's degree is estimated to earn ____ times more than someone with a high school diploma.
oee [108]
The correct answer is <span>B)</span> 1.4

It can be difficult to become a high earner in the U.S without a college degree. Those with a high school diploma or less are the lowest earners on average. According to research, average yearly earnings for someone with a bachelor’s degree are $59,124 as compared to someone with a high school diploma who earns an average of $35,256 per year. Thus, at the end of the day, the amount of money does become significant.



5 0
3 years ago
Other questions:
  • Pointsfor a failover cluster, what type of network would you use to communicate with an iscsi device?
    15·1 answer
  • Tricia listed her assets and liabilities. Credit Card Bill Car Loan Bonds Piano Bank Account Bicycle Which are Tricia’s liabilit
    8·2 answers
  • What information is required for a complete citation of a website source?
    8·2 answers
  • What is an example of a source that is less likely to be copyrighted?
    7·2 answers
  • A site structure that contains multiple links to individual pages, allowing visitors to go through multiple paths to the site is
    9·1 answer
  • Technically
    12·1 answer
  • When using a function to preform a calculation how would you select the range of numbers to use
    13·1 answer
  • When searching the web software programs called fetch a few web pages and then they follow the links on those pages and fetch th
    9·2 answers
  • Windows Rights Management Services is used in conjunction with which Microsoft applications?
    11·1 answer
  • A class is a type of object that defines the format of the object and the actions it can perform. True False
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!