I have a question about question 3 in part 2.
Research has shown that when shoppers see odd prices like $1.99 or $7.95, they assume something is on sale. Our store makes sure all discounted items have odd prices while normal items have even prices.
The sale at our store has ended, and we need to find all of the items that have odd prices so we can remove the discount.
You will need to:
- Fix the syntax error in the program.
- Use a
forloop to loop over the
all_itemslist which contains each item’s name and price.
- Find all items with an odd price and add the name of the item to the
Make sure the testing code which prints
discounted_items is at the bottom of your code. Do NOT print out items that are not discounted.
Are we looking to simply remove them from the list or replace them into the discounted_items list as well? if so what is an efficient way of doing both code wise?