This needs to be in Python, I’ve seen similar questions answeredhere, but I get errors when I do those, so maybe this will bebetter. Thanks!
1. Build an ItemToPurchase class with the followingspecifications:
- Attributes (3 pts)
- item_name (string)
- item_price (float)
- item_quantity (int)
- Default constructor (1 pt)
- Initializes item’s name = “none”, item’s price = 0, item’squantity = 0
- Method
- print_item_cost()
Example of print_item_cost() output:
Bottled Water 10 @ $1 = $10
2. In the main section of your code, prompt the user for two itemsand create two objects of the ItemToPurchase class.
Example:
Item 1
Enter the item name:
Chocolate Chips
Enter the item price:
3
Enter the item quantity:
1
Item 2
Enter the item name:
Bottled Water
Enter the item price:
1
Enter the
OR
OR