- You are incorrectly using the
*=and+=statements. - You can't use the
taxes *=0.06statement unless you have definedtaxespreviously. Same is the case withlicenceandpremium_pack. - Also, the statement
float(input(taxes))is wrong, you need to pass a string as an argument to it. (http://docs.python.org/3/library/functions.html#input) - Next, if you are using python 2.7, the usage of the input statement is incorrect - you should use
raw_inputinstead. (http://stackoverflow.com/a/3800862/1860929) - There is an extra closing bracket in
print("\n\total price:", total_price))statement - You are using an extra
\after\ndue to which, thetof total will get escaped. - Finally, you need to check the logic itself. As @Wayne has pointed in his answer, you probably want to do
taxes = base_price * 0.06and nottaxes = taxes * 0.06
Check the following code, I think you are looking for something similar
base_price = float(raw_input("Please enter base price of car",)) taxes = 0.06 * base_price print("Taxes: %s" %taxes) licence = 0.01 * base_price print("Licence: %s" %licence) premium_pack = 1250 print("premium pack: 1250") total_price = base_price + premium_pack + taxes + licence print("\ntotal price: %s" %total_price) raw_input("\n\npress enter key to exit")