In what concerns the continuous evaluation solving exercises grade during the semester, you should submit until 23:59 of November 30th
(this exercise will still be available for submission after that deadline, but without counting towards your grade)
[to understand the context of this problem, you should read the class #07 exercise sheet]


In this problem you should submit a function as described. Inside the function do not print anything that was not asked!

[IP067] High Price

Louise Belcher, the sharp-witted youngest Belcher sibling, wants to find out which menu items at Bob's Burgers have the highest price. The restaurant's menu is represented as a dictionary where the keys are the item names and the values are their prices. Louise wants a list of all menu items that have the maximum price

The Problem

Write a function highest_items(menu) that given a dictionary menu with string keys representing menu items and integer values representing prices, returns a list of strings containing the menu items with the highest price. If multiple items share the maximum price, all of them should be included in the list, which can be in any order.

Constraints

The following limits are guaranteed in all the test cases that will be given to your program:

1 ≤ |menu| ≤ 100       number of items in the menu

Example Function Calls Example Output
menu = {"donut":100, "burger":400, "water":50, "pizza":400, "juice":150}
print(sorted(highest_items(menu)))
['burger', 'pizza']

Introduction to Programming (CC1024)
DCC/FCUP - University of Porto