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, 22.06.2019 21:00
Write a method so that the main() code below can be replaced by the simpler code that calls method original main(): public class calcmiles { public static void main(string [] args) { double milesperhour; double minutestraveled; double hourstraveled; double milestraveled; milesprhour = scnr.nextdouble(); minutestraveled = scnr.nextdouble(); hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; system.out.println("miles: " + milestraveled); } }
Answers: 2
question
Computers and Technology, 23.06.2019 03:30
In vista and windows 7, the appearance and personalization option allows you to change the
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a.an advanced knowledge of physics and math b.an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 2
question
Computers and Technology, 24.06.2019 06:30
Some peer-to-peer networks have a server and some don't. true false
Answers: 2
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, 15.01.2021 09:10
Questions on the website: 13722360