# Essay on Unit 3 Assignment 1

Algorithm Workbench Review: 3. Write assignment statements that perform the following operations with the variables a, b, and c. d. Adds 2 to a and stores the result in b e. Multiplies b times 4 and stores the result in a f. Divides a by 3.14 and stores the result in b g. Subtracts 8 from b and stores the result in a ii. b = a + 2 iii. a = b * 4

*…show more content…*

Programming Exercise: 1. Sales Tax a. Design a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county sales tax. Assume the state sales tax is 4% and the county sales tax is 2%. The program should display the amount of the purchase, the state sales tax, the county sales tax, the total sales tax, and the total of the sale (which is the sum of the amount of purchase plus the total sales tax.) 1. # Stating the TAX rates 2. STATE_TAX = 0.04 3. COUNTY_TAX = 0.02 4. # Asking the user for price of item 5. price = float(input('How much is the item?: ')) 6. # Calculating both taxes to 1 item 7. total_tax = STATE_TAX + COUNTY_TAX 8. # Calculating the tax with the users price 9. taxed = price * total_tax 10. # Adding the total price with the total