Click here to Skip to main content
15,883,705 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
1) The program prompts the user to enter the value of the sale with the following statement:
“Enter the value of the company’s sales in dollars in August 2013:”

2) The sale value should be stored in a variable of type float

3) Compute the sales tax based on 6% of the sale

4) Print the resulting sales tax in the following format:
“The sales tax is $ for August 2013 ”

My code i dont know how to do step 3:

value = float(input("Enter the value of the company's sales in dollars in August 2013: "))
Posted
Comments
Mehdi Gholam 7-Sep-13 13:47pm    
Looks like homework.
PythonProgrammer 7-Sep-13 13:49pm    
yes i just don't understand how to do step 3 besides that i know how to finish the rest of it

Dear Member,
You can do the calculation as follows:-
Python
value = float(input("Enter the value of the company's sales in dollars in August 2013: "))
st = value * 6 /100
print ("The sales tax is $" , st , " for August 2013 ")


// Sunil
 
Share this answer
 
v4
Well, this is so simple to understand. I don't sure whether you can't build logic or can't understand how to implement it by python code.
If you say abut logic,then i should say,as per my understand you need to compute sales tax value based on 6% value of a total company sale.
So, let's say the value of a company’s sales in dollars in August 2013: 100$
So the sales tax would be 6$ as i said about 6% of the total value if there are not any other per-requisite to calculate that.
So logically you need to calculate: ((6/100)*(value of the company’s sales in dollars in August 2013)).
Hope you are clear enough to code it!

Happy Coding!
Shuvro
 
Share this answer
 
v4
Comments
ridoy 7-Sep-13 14:05pm    
well,probably someone don't like the logic as i don't provide code here! People don't like logic may be,they love to see ready codes! :)
Sergey Alexandrovich Kryukov 8-Sep-13 0:14am    
This is a fair answer and a fair comment, a 5.
—SA
ridoy 8-Sep-13 2:09am    
Thank you, SA. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900