The program below asks a user how many of each coin (quarters, dimes, nickels, pennies) they have and add up the total monetary value of all coins. The inputs are initially stored as strings. You will need to add code to convert those string values to numbers and perform math on the numbers to calculate the total amount.

Convert the quarters variable to an integer using the int() method, multiply it by 0.25, and add the result to the total variable.
Convert the dimes variable to an integer using the int() method, multiply it by 0.10, and add the result to the total variable.
Convert the nickels variable to an integer using the int() method, multiply it by 0.05, and add the result to the total variable.
Convert the pennies variable to an integer using the int() method, multiply it by 0.01, and add the result to the total variable.
Note that at each step, the total variable should increase by the amount calculated (so the result must be stored back in total).

The following examples demonstrate the expected program output.

How many quarters do you have? 5
How many dimes do you have? 0
How many nickels do you have? 0
How many pennies do you have? 0
You have 1.25 dollars in coins.
How many quarters do you have? 4
How many dimes do you have? 10
How many nickels do you have? 20
How many pennies do you have? 9
You have 3.09 dollars in coins.
How many quarters do you have? 1
How many dimes do you have? 1
How many nickels do you have? 1
How many pennies do you have? 1
You have 0.41 dollars in coins.

quarters = input("How many quarters do you have? ")

dimes = input("How many dimes do you have? ")
nickels = input("How many nickels do you have? ")
pennies = input("How many pennies do you have? ")

total = 0

# Convert quarters to integer, multiply by 0.25, and add to total
total += int(quarters) * 0.25

# Convert dimes to integer, multiply by 0.10, and add to total
total += int(dimes) * 0.10

# Convert nickels to integer, multiply by 0.05, and add to total
total += int(nickels) * 0.05

# Convert pennies to integer, multiply by 0.01, and add to total
total += int(pennies) * 0.01

print("You have", total, "dollars in coins.")

The program below asks a user how many of each coin (quarters, dimes, nickels, pennies) they have and add up the total monetary value of all coins. The inputs are initially stored as strings. You will need to add code to convert those string values to numbers and perform math on the numbers to calculate the total amount.

Convert the quarters variable to an integer using the int() method, multiply it by 0.25, and add the result to the total variable.
Convert the dimes variable to an integer using the int() method, multiply it by 0.10, and add the result to the total variable.
Convert the nickels variable to an integer using the int() method, multiply it by 0.05, and add the result to the total variable.
Convert the pennies variable to an integer using the int() method, multiply it by 0.01, and add the result to the total variable.
Note that at each step, the total variable should increase by the amount calculated (so the result must be stored back in total).

The following examples demonstrate the expected program output.

How many quarters do you have? 5
How many dimes do you have? 0
How many nickels do you have? 0
How many pennies do you have? 0
You have 1.25 dollars in coins.
How many quarters do you have? 4
How many dimes do you have? 10
How many nickels do you have? 20
How many pennies do you have? 9
You have 3.09 dollars in coins.
How many quarters do you have? 1
How many dimes do you have? 1
How many nickels do you have? 1
How many pennies do you have? 1
You have 0.41 dollars in coins.

total = 0
quarters = input("How many quarters do you have? ")
dimes = input("How many dimes do you have? ")
nickels = input("How many nickels do you have? ")
pennies = input("How many pennies do you have? ")

#write the math to add the value of each coin to the total

total = str.format("{:.2f}", total)
print("You have ", total, "dollars in coins.")

total = 0

quarters = input("How many quarters do you have? ")
dimes = input("How many dimes do you have? ")
nickels = input("How many nickels do you have? ")
pennies = input("How many pennies do you have? ")

# Convert quarters to integer, multiply by 0.25, and add to total
total += int(quarters) * 0.25

# Convert dimes to integer, multiply by 0.10, and add to total
total += int(dimes) * 0.10

# Convert nickels to integer, multiply by 0.05, and add to total
total += int(nickels) * 0.05

# Convert pennies to integer, multiply by 0.01, and add to total
total += int(pennies) * 0.01

total = str.format("{:.2f}", total)
print("You have", total, "dollars in coins.")

The following examples demonstrate the expected program output.

How many quarters do you have? 5
How many dimes do you have? 0
How many nickels do you have? 0
How many pennies do you have? 0
You have 1.25 dollars in coins.

How many quarters do you have? 4
How many dimes do you have? 10
How many nickels do you have? 20
How many pennies do you have? 9
You have 3.09 dollars in coins.

How many quarters do you have? 1
How many dimes do you have? 1
How many nickels do you have? 1
How many pennies do you have? 1
You have 0.41 dollars in coins.

total = 0

quarters = input("How many quarters do you have? ")
dimes = input("How many dimes do you have? ")
nickels = input("How many nickels do you have? ")
pennies = input("How many pennies do you have? ")

# Convert quarters to integer, multiply by 0.25, and add to total
total += int(quarters) * 0.25

# Convert dimes to integer, multiply by 0.10, and add to total
total += int(dimes) * 0.10

# Convert nickels to integer, multiply by 0.05, and add to total
total += int(nickels) * 0.05

# Convert pennies to integer, multiply by 0.01, and add to total
total += int(pennies) * 0.01

total = round(total, 2)
print("You have", total, "dollars in coins.")