Computer Science, asked by pinky9672, 4 months ago

Consider the following series: (2)

pencils 20

notebooks 33

scales 52

erasers 10

a) Write the command to display all stationary items having price more than 50.

b) Write the command to change the price of notebooks to 50​

Answers

Answered by AnushGudimetla
0

Answer for 1st bit, which prints items with cost more than 50:

list= [[["pencil  [20]", "notebooks  [33]", "scales  [52]", "eraser  [10]"]

for item, cost in list:

    if cost > 50:

         print(item)

Similar questions