Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot
  1. You are incorrectly using the *= and += statements.
  2. You can't use the taxes *=0.06 statement unless you have defined taxes previously. Same is the case with licence and premium_pack.
  3. 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)
  4. Next, if you are using python 2.7, the usage of the input statement is incorrect - you should use raw_input instead. (http://stackoverflow.com/a/3800862/1860929https://stackoverflow.com/a/3800862/1860929)
  5. There is an extra closing bracket in print("\n\total price:", total_price)) statement
  6. You are using an extra \ after \n due to which, the t of total will get escaped.
  7. Finally, you need to check the logic itself. As @Wayne has pointed in his answer, you probably want to do taxes = base_price * 0.06 and not taxes = 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") 
  1. You are incorrectly using the *= and += statements.
  2. You can't use the taxes *=0.06 statement unless you have defined taxes previously. Same is the case with licence and premium_pack.
  3. 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)
  4. Next, if you are using python 2.7, the usage of the input statement is incorrect - you should use raw_input instead. (http://stackoverflow.com/a/3800862/1860929)
  5. There is an extra closing bracket in print("\n\total price:", total_price)) statement
  6. You are using an extra \ after \n due to which, the t of total will get escaped.
  7. Finally, you need to check the logic itself. As @Wayne has pointed in his answer, you probably want to do taxes = base_price * 0.06 and not taxes = 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") 
  1. You are incorrectly using the *= and += statements.
  2. You can't use the taxes *=0.06 statement unless you have defined taxes previously. Same is the case with licence and premium_pack.
  3. 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)
  4. Next, if you are using python 2.7, the usage of the input statement is incorrect - you should use raw_input instead. (https://stackoverflow.com/a/3800862/1860929)
  5. There is an extra closing bracket in print("\n\total price:", total_price)) statement
  6. You are using an extra \ after \n due to which, the t of total will get escaped.
  7. Finally, you need to check the logic itself. As @Wayne has pointed in his answer, you probably want to do taxes = base_price * 0.06 and not taxes = 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") 
added 308 characters in body
Source Link
Anshul Goyal
  • 78k
  • 42
  • 162
  • 196
  1. You are incorrectly using the *= and += statements.
  2. You can't use the taxes *=0.06 statement unless you have defined taxes previously. Same is the case with licence and premium_pack.
  3. Also, the statement float(input(taxes)) is wrong, you need to pass a string as an argument to it. Check (http://docs.python.org/3/library/functions.html#input)
  4. Next, if you are using python 2.7, the usage of the input statement is incorrect - you should use [raw_input][1]raw_input instead. (http://stackoverflow.com/a/3800862/1860929)
  5. There is an extra closing bracket in print("\n\total price:", total_price)) statement
  6. You are using an extra \ after \n due to which, the t of total will get escaped.
  7. Finally, you need to check the logic itself. As @Wayne has pointed in his answer, you probably want to do taxes = base_price * 0.06 and not taxes = taxes * 0.06

Check the following code, I think you are looking for something similar

base_price = float(inputraw_input("please"Please enter base price of car",)) taxes = float(input("taxes")) taxes *=00.06 licence =* float(inputbase_price print("licence")"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("\n\total"\ntotal price:", total_price%s" %total_price) exit = inputraw_input("\n\npress enter key to exit") 
  1. You are incorrectly using the *= and += statements.
  2. You can't use the taxes *=0.06 statement unless you have defined taxes previously. Same is the case with licence and premium_pack.
  3. Also, the statement float(input(taxes)) is wrong, you need to pass a string as an argument to it. Check http://docs.python.org/3/library/functions.html#input
  4. Next, if you are using python 2.7, the usage of the input statement is incorrect - you should use [raw_input][1] instead.
  5. Finally, you need to check the logic itself. As @Wayne has pointed in his answer, you probably want to do taxes = base_price * 0.06 and not taxes = taxes * 0.06

Check the following code, I think you are looking for something similar

base_price = float(input("please enter base price of car",)) taxes = float(input("taxes")) taxes *=0.06 licence = float(input("licence")) licence *= 0.01 premium_pack = 1250 print("premium pack + 1250") total_price = base_price + premium_pack + taxes + licence print("\n\total price:", total_price) exit = input("\n\npress enter key to exit") 
  1. You are incorrectly using the *= and += statements.
  2. You can't use the taxes *=0.06 statement unless you have defined taxes previously. Same is the case with licence and premium_pack.
  3. 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)
  4. Next, if you are using python 2.7, the usage of the input statement is incorrect - you should use raw_input instead. (http://stackoverflow.com/a/3800862/1860929)
  5. There is an extra closing bracket in print("\n\total price:", total_price)) statement
  6. You are using an extra \ after \n due to which, the t of total will get escaped.
  7. Finally, you need to check the logic itself. As @Wayne has pointed in his answer, you probably want to do taxes = base_price * 0.06 and not taxes = 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") 
added 308 characters in body
Source Link
Anshul Goyal
  • 78k
  • 42
  • 162
  • 196

You are incorrectly using the *= and += statements.

You can't use the taxes *=0.06 statement unless you have defined taxes previously. Same is the case with licence and premium_pack.

Also, the statement float(input(taxes)) is wrong, you have to pass a string as an argument. Check http://docs.python.org/3/library/functions.html#input

  1. You are incorrectly using the *= and += statements.
  2. You can't use the taxes *=0.06 statement unless you have defined taxes previously. Same is the case with licence and premium_pack.
  3. Also, the statement float(input(taxes)) is wrong, you need to pass a string as an argument to it. Check http://docs.python.org/3/library/functions.html#input
  4. Next, if you are using python 2.7, the usage of the input statement is incorrect - you should use [raw_input][1] instead.
  5. Finally, you need to check the logic itself. As @Wayne has pointed in his answer, you probably want to do taxes = base_price * 0.06 and not taxes = taxes * 0.06

Check the following code, I think you are looking for something similarsimilar

base_price = float(input("please enter base price of car",)) taxes = float(input("taxes")) taxes *=0.06 licence = float(input("licence")) licence *= 0.01 premium_pack = 1250 print("premium pack + 1250") total_price = base_price + premium_pack + taxes + licence print("\n\total price:", total_price) exit = input("\n\npress enter key to exit") 

You are incorrectly using the *= and += statements.

You can't use the taxes *=0.06 statement unless you have defined taxes previously. Same is the case with licence and premium_pack.

Also, the statement float(input(taxes)) is wrong, you have to pass a string as an argument. Check http://docs.python.org/3/library/functions.html#input

Check the following code, I think you are looking for something similar

base_price = float(input("please enter base price of car",)) taxes = float(input("taxes")) taxes *=0.06 licence = float(input("licence")) licence *= 0.01 premium_pack = 1250 print("premium pack + 1250") total_price = base_price + premium_pack + taxes + licence print("\n\total price:", total_price) exit = input("\n\npress enter key to exit") 
  1. You are incorrectly using the *= and += statements.
  2. You can't use the taxes *=0.06 statement unless you have defined taxes previously. Same is the case with licence and premium_pack.
  3. Also, the statement float(input(taxes)) is wrong, you need to pass a string as an argument to it. Check http://docs.python.org/3/library/functions.html#input
  4. Next, if you are using python 2.7, the usage of the input statement is incorrect - you should use [raw_input][1] instead.
  5. Finally, you need to check the logic itself. As @Wayne has pointed in his answer, you probably want to do taxes = base_price * 0.06 and not taxes = taxes * 0.06

Check the following code, I think you are looking for something similar

base_price = float(input("please enter base price of car",)) taxes = float(input("taxes")) taxes *=0.06 licence = float(input("licence")) licence *= 0.01 premium_pack = 1250 print("premium pack + 1250") total_price = base_price + premium_pack + taxes + licence print("\n\total price:", total_price) exit = input("\n\npress enter key to exit") 
Source Link
Anshul Goyal
  • 78k
  • 42
  • 162
  • 196
Loading