# Add $2 shipping fee to each book
# Print each item from this list on a separate line
# but each line must also add the shipping charge
# Example
# A 12.52 book with a $2 shipping fee would print
# Book price 12.52 shipping fee 2.0 Total 14.52
book_costs = [39.50, 78.25, 18.02, 127.45]
for book in book_costs:
print(book)
book_costs = [39.50, 78.25, 18.02, 127.45]
for book in book_costs:
print("Book price",book,"shipping fee 2.0 Total",(book+2.0))
Book price 39.5 shipping fee 2.0 Total 41.5 Book price 78.25 shipping fee 2.0 Total 80.25 Book price 18.02 shipping fee 2.0 Total 20.02 Book price 127.45 shipping fee 2.0 Total 129.45
# Add $2 shipping fee to each book # Print each item from this list on a separate line # but each line must also add the shipping charge # Example # A 12.52 book with a $2 shipping fee would print # B...
The homework assignment is to write a fee invoice using C. It
must follow the guidelines posted in the question and run as the
sample run given. Here is the question and sample run below
Please read the sample runs carefully as this is quite different
from the previous projects. In this project, the student can take
as many courses as permitted. The list of courses to take are
listed below. This time there is no restriction on the total...
Waterway Wizard is a publishing company with a number of different book lines. Each line has contracts with a number of different authors. The company also owns a printing operation called Quick Press. The book lines and the printing operation each operate as a separate profit center. The printing operation cars revenue by printing books by authors under contract with the book lines owned by Waterway Wizard, as well as authors under contract with other companies. The printing operation bils...
Deletion of List Elements The del statement removes an element or slice from a list by position. The list method list.remove(item) removes an element from a list by it value (deletes the first occurance of item) For example: a = ['one', 'two', 'three'] del a[1] for s in a: print(s) b = ['a', 'b', 'c', 'd', 'e', 'f', 'a', 'b'] del b[1:5] print(b) b.remove('a') print(b) # Output: ''' one three ['a', 'f', 'a', 'b'] ['f', 'a', 'b'] ''' Your textbook...
Need help solving this qestion related to object and item classes involving arrays in PYTHON. Classes and Object - Inventory Item as Object In this assignment the idea is to use an Item class to capture what you need for recording and displaying the details of an order from an online store like Amazon. This is a Class and Object assignment. For the assignment you must define and implement the Item class so that the code shown immediately below can...
please use C++ write a program to read a textfile containing a list of books. each line in the file has tile, ... Question: Write a program to read a textfile containing a list of books. each line in the file has tile, ..... write a program to read a textfile containing a list of books. each line in the file has tile, ... Question: Write a program to read a textfile containing a list of books. Each line in...
In this project you will write a C++ program that simulates the purchase of a single item in an online store. What to do Write a C++ program that: 1. Prints out a welcome message. 2. Prompts the user for the following information: (a) Their first name (example: Roger) (b) Their last name (example: Waters) (c) The name of the product (example: Brick) (d) The unit price of the product (example: 1.99) (e) The quantity to buy (example: 200) (f)...
I am stuck with this coding problem from edx coding python 4.4.6: #This is a long one -- our answer is 20 lines of code, but #yours will probably be longer. That's because it's one of the #more authentic problems we've done so far. This is a real #problem you'll start to face if you want to start creating #useful programs. # #One of the reasons that filetypes work is that everyone #agrees how they are structured. A ".png" file,...
c++ only Program 2: Linked List Class For this problem, let us take the linked list we wrote in a functional manner in a previous assignment and convert it into a Linked List class. For extra practice with pointers we’ll expand its functionality and make it a doubly linked list with the ability to traverse in both directions. Since the list is doubly linked, each node will have the following structure: struct Node { int number; Node * nextNode;...
In Java(using BlueJ) Purpose Purpose is to practice using file input and output, and array list of objects. Also, this lab specification tells you only what to do, you now have more responsibility to design how to do it. Problem description You are given a text file called 'Students.txt' that contains information on many students. Your program reads the file, creating many Student objects, all of which will be stored into an array list of Student objects, in the Students...
I need this in C++. This is all
one question
Program 2: Linked List Class For this problem, let us take the linked list we wrote in a functional manner in a previous assignment and convert it into a Linked List class. For extra practice with pointers we'll expand its functionality and make it a doubly linked list with the ability to traverse in both directions. Since the list is doubly linked, each node will have the following structure: struct...