Westonci.ca is the Q&A platform that connects you with experts who provide accurate and detailed answers. Get immediate and reliable solutions to your questions from a community of experienced professionals on our platform. Get immediate and reliable solutions to your questions from a community of experienced professionals on our platform.

assign 4 values to given number of quarters, dimes, nickels and pennies. those values must be asked to the user as an input. i want you to write a program which takes the number of quarters, dimes, nickels and pennies and output the total amount as dollars and cents. your output must consists of two digits after the decimal point. ex: if the input is: 8 3 2 1 where 8 is the number of quarters, 3 is the number of dimes, 2 is the number of nickels, and 1 is the number of pennies, the output is: amount: $2.41 you can assume no negative number is the input.

Sagot :

The software to deliver a predetermined number of coins in the four different coin values of quarters, dimes, nickels, and pennies. Such values must be requested from the user.

Explain the term Python?

  • Python is a dynamically typed, multi-paradigm programming language with many uses.
  • It enforces a clear and uniform syntax and is meant to be easy to learn, comprehend, and use.

Thus, the program to provide a specified quantity of quarters, dimes, nickels, and pennies four different values. The user must be prompted to enter such values is-

print("Please enter the number of coins:")

quarters=int(input("# of quarters:"))

quarters=quarters*25

dimes=int(input("# of dimes:"))

dimes=dimes*10

nickels=int(input("# of nickels:"))

nickels=nickels*5

print("The total is")

Thus, the output must have two digits following the decimal point.

For example, if the input is 8 3 2 1—where 8 represents the number of quarters, 3 represents the number of dimes, 2 represents the number of nickels, and 1 represents the number of pennies—and the output is $2.41, you can infer that the input is not a negative number.

To know more about the Python, here

https://brainly.com/question/26497128

#SPJ4