Sunday 15 January 2012

for loop - Homework: Sales Tax python program -


I am working on Python on homework problem I am trying to create a program that calculates sales tax The program will then calculate all the entire numbers between start and end (pre. = 5%, end = 8%, etc.). I will give the option of calculating an option and an end to determine the initial rate for the user to calculate It will calculate 5,6,7,8% tax.

I was told Use this code:

  start  10: start = int (input ("Enter tax rate:"))  

I have to use the loop also. I have to give 3 prompt to the user: the sale price, the initial rate, the closing rate. The program will then give the user a table of rate and total values:

I have been stumped for a loop and include time statement

I have a very beginning process Start: Enter (Enter "Tax Rate:")) Total = Productivity + Productivity * Start:

  productprice = float (Input ("Enter Product:")) Start = Float / 100 print Total raw_input ("Enter to exit")  

?

  value = float (input ("Enter the price of the product:")) To begin # start declaration and end variable as empty string start = "" end = "" # While the loops are to ensure that a user invests a tax rate which is more than # 0 and less than 10 starts  

Output:

  Enter the price of the product: Enter 100 tax rate: Enter the rate of 6 end tax : 9 Price: 100.0 Taxes: 6 Total: 106.0 Price: 100.0 Taxes: 7 Total: 107.0 Price: 100.0 Taxes: 8 Total: 108.0 Price: 100.0 Taxes: 9 Total: 109.0  

No comments:

Post a Comment