10.20 LAB*: Program: Online shopping cart (Part 1)
(1) Build the ItemToPurchase class with the following
specifications:
Ex. of print_item_cost() output:
(2) In the main section of your code, prompt the user for two
items and create two objects of the ItemToPurchase class. (2
pts)
Ex:
(3) Add the costs of the two items together and output the total
cost. (2 pts)
Ex:
main.py 1 # Type code for classes here 2 3 4. if name "_main__": 5 # Type main section of code here ==
10.20 LAB*: Program: Online shopping cart (Part 1) (1) Build the ItemToPurchase class with the following specifications:
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
10.20 LAB*: Program: Online shopping cart (Part 1) (1) Build the ItemToPurchase class with the following specifications:
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!