Computers and Technology
Computers and Technology, 01.11.2020 23:20, nae467

Code Problem 4 in Python 2. Problem 4

You’ve been hired to write a Python program for scanned items at a grocery mart. The scan is of the form [x, y, z] where x is the number of items purchased, y is the price of the item, and z is whether the item is taxable (7% tax on grocery items). For example assume you were given the list below:
[[1, 1.45, 1], [3, 4.24, 1], [2, 14.00, 0], [4, 1.25, 1]]
This means the amount owed is:
amt = 1(1.45) (1.07) + 3(4.24) (1.07) +2(14.00) + 4(1.25) (1.07)
= ((1.45 + 12.72 + 5.00)1.07) + 28.00
= 19.17(1.07) + 28.00
= 20.51 + 28.00
= 48.51

Code the problem in Python 2 and add “comments explaining what the code is doing.


Code Problem 4 in Python 2.

Problem 4
You’ve been hired to write a Python program for scanned ite

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:00, simbupls
Technician a says that the radiator usually cools better if the front air dam is removed. technician b says that when a condenser has a leak it can be repaired easily with epoxy. who is correct?
Answers: 1
image
Computers and Technology, 23.06.2019 00:00, dubouuu
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
image
Computers and Technology, 24.06.2019 16:30, Dajuan2x
Jenny needs to record the names of 30 students, write down the subjects they studied, and note their grades in each subject after the midsemester exams and the end-of-semester exams. she divides the midsemester and end-of-semester information into two separate worksheets, sheet 1 and sheet 2. how will she rename the two worksheets?
Answers: 2
image
Computers and Technology, 24.06.2019 18:30, millie54
How does the use of e-mail benefit business communications? it can be sent at any time. it is faster than regular mail. it improves writing skills. it is less expensive than using a courier. it reduces the need for proofreading.
Answers: 1
Do you know the correct answer?
Code Problem 4 in Python 2. Problem 4

You’ve been hired to write a Python program for s...

Questions in other subjects:

Konu
Mathematics, 03.02.2020 09:48