Question

PExam12 T Text Shape ide Play Keynote Live Table Chart Media Comment Collaborate Expected Output Task 1 Python 3.6.1 Shell FiHelp with a Python programming problem, i got the first problem correct but cant seem to get this one.

  • TASK 2: A retail company must file a monthly sales tax report listing the total sales for the month and the amount of state and federal sales tax collected.
    • The Company made $1000 in sales in month 1.
    • Sales increased by 10% from the previous month each month for 6 months except in month 5 where it increased only 7%. (i.e. From month 5 to month 6 there was only a 7% increase)
    • State tax rate is 5 percent and the Federal tax rate is 2.5 percent.
    • Write code that utilizes a while loop to display the amount of sales and tax collected in each of the six month as shown on slide 3.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

monthly_sale=[1000] # First month sales
for i in range(1,6):
if(i==5):
monthly_sale.append(monthly_sale[i-1]+monthly_sale[i-1]*7/100) # 7% sales increases in month 6
else:
monthly_sale.append(monthly_sale[i-1]+monthly_sale[i-1]*10/100) # 10% sales increases in month 1-5
state_tax=[]
fed_tax=[]
total_tax=[]
sales_minus_tax=[]
for i in range(6):
state_tax.append(monthly_sale[i]*5/100)
fed_tax.append(monthly_sale[i]*2.5/100)
total_tax.append(state_tax[i]+fed_tax[i])
sales_minus_tax.append(monthly_sale[i]-total_tax[i])
print("MONTH MONTHLY SALES STATE TAX AMOUNT FED TAX AMOUNT TOTAL TAX AMOUNT SALES-TAX")
for i in range(6):
print(i+1,end=" ");
print("$%.2f"%monthly_sale[i],end=" ")
print("$%.2f"%state_tax[i],end=" ")
print("$%.2f"%fed_tax[i],end=" ")
print("$%.2f"%total_tax[i],end=" ")
print("$%.2f"%sales_minus_tax[i])


  

# 7% increases in month 6 # 10% increases in month 1-5 main.py 1 monthly_sale=[1000] 2- for i in range(1,6): 3 if(i==5): 4 moMONTH au WN MONTHLY SALES $1000.00 $1100.00 $1210.00 $1331.00 $1464.10 $1566.59 STATE TAX AMOUNT $50.00 $55.00 $60.50 $66.55

Add a comment
Know the answer?
Add Answer to:
Help with a Python programming problem, i got the first problem correct but cant seem to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • in PYTHON -should look like attached PHOTO -A retail company must file a monthly sales tax...

    in PYTHON -should look like attached PHOTO -A retail company must file a monthly sales tax report listing the total sales for the month and the amount of state and federal sales tax collected. -The Company made $1000 in sales in month 1. -Sales increased by 10% from the previous month each month for 6 months except in month 5 where it increased only 7%. (i.e. From month 5 to month 6 there was only a 7% increase) -State tax...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT