subject
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

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
What do the principles of notice, choice, onward transfer, and access closely apply to? a. privacyb. identificationc. retentiond. classification
Answers: 1
question
Computers and Technology, 23.06.2019 22:00
Technician a says engine assemblies can be mounted longitudinally in a chassis. technician b says engine assemblies can be mounted transversely in a chassis. who is correct?
Answers: 2
question
Computers and Technology, 24.06.2019 06:30
For which utilities, if any, does the landlord pay?
Answers: 2
question
Computers and Technology, 24.06.2019 19:50
How to unblock on chrome book? ?
Answers: 1
You know the right answer?
Code Problem 4 in Python 2. Problem 4

You’ve been hired to write a Python program for s...
Questions
question
Mathematics, 17.10.2020 14:01
question
Physics, 17.10.2020 14:01
question
Business, 17.10.2020 14:01
question
Mathematics, 17.10.2020 14:01
question
Mathematics, 17.10.2020 14:01
question
Mathematics, 17.10.2020 14:01
question
French, 17.10.2020 14:01
Questions on the website: 13722360