Question

Given the following list of prices of taxable items, find the total price of the items...

Given the following list of prices of taxable items, find the total price of the items including sales tax and enter it into the text box on the following screen.

Write your code once using a for loop to add the prices, then do it again, replacing your for loop with Python’s built in sum function.

•   The pre-tax cost of the items is: $2.99, $7.50, $29.99, and $6.99.
•   The sales tax is 5.75%.
•   Make sure to round your final answer to the nearest cent.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

50.1999 can be 50.2

lst = [2.99, 7.50, 29.99, 6.99]

sumTotal = sum(lst)

sumTotalWithTax = sumTotal + 5.75*sumTotal/100

print(sumTotalWithTax)

=================================================================
=========
50.1999 can be 50.2


SEE OUTPUT

PLEASE COMMENT if there is any concern.

=============================

Add a comment
Know the answer?
Add Answer to:
Given the following list of prices of taxable items, find the total price of the items...
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
  • If you’re using Visual Studio Community 2015, as requested, the instructions below should be exact but...

    If you’re using Visual Studio Community 2015, as requested, the instructions below should be exact but minor discrepancies may require you to adjust. If you are attempting this assignment using another version of Visual Studio, you can expect differences in the look, feel, and/or step-by-step instructions below and you’ll have to determine the equivalent actions or operations for your version on your own. INTRODUCTION: In this assignment, you will develop some of the logic for, and then work with, the...

  • Payable: Use the t-accts below to record the following entries. If you get stuck, carefully revie...

    Payable: Use the t-accts below to record the following entries. If you get stuck, carefully review the online and text examples. On September 1t, Geo Inc. borrows $2,400 from State Bank and signs a 10 month short-term note payable. The interest rate on the note is 7%. Even though the note is only for 10 months, the interest rate is an annual rate (see interest calculations below). a) Record the entry to borrow the money from the bank. b) Next,...

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