Hey sorry if the title was misleading but for my assignment for the week I must make a program that converts dollars to pounds which is easy however I cannot seem to figure out how to input a dollar sign with my code then do addition with it since it a float cannot have dollar signs in it.
I need my inputs to look like this:
Enter a dollar amount: $5.44
Enter another dollar amount: $6.67
However I cannot seem to figure out how to get the dollar sign in with the input, and then remove the dollar sign to do the adding of the two dollars.
#giving variables for the input of dollar amount
dollar1 = float(input("Enter a dollar amount: "))
dollar2 = float(input("Enter another dollar amount: "))
dollarTotal = (dollar1 + dollar2)
print("Your total is: ","$", format (dollarTotal, "0.2f"), sep="")
Everything works out fine however I can not put in dollar signs into the input and I have to to receive full credit, thank you for your help.