I just started to learn Python and I am trying to learn about dictionaries. I need to see if I can learn to get the items with the prices greater than $100.00. I want it to loop through my dictionary using a For Loop then use an If statement to see if the prices are greater than $100.00, then print those items. Any ideas can be much appreciated!
item_prices = {
'lawn mower': 249.99,
'weed eater': 219.99,
'weed eating string': 19.99,
'mower blades': 24.99
}
for item in item_prices:
if item > 100.00:
print(item)
TypeError Traceback (most recent call last)
Input In [33], in <cell line: 1>()
1 for item in item_prices:
----> 2 if item > 100.00:
3 print(item)
TypeError: '>' not supported between instances of 'str' and 'float'