Put the lesson Dictionaries into practice by writing a program yourself.
The dictionary below maps metals to their melting points in °C. Add tungsten, which melts at 3422 °C.
Then look values up by name, count the entries, and safely check for a metal that isn't recorded.
"Tungsten" with the value 3422.Tungsten: 3422 °C by looking the value up in the dictionary.Metals recorded: 4 using len().Gold: not recorded using get() with a default value.Tungsten: 3422 °C Metals recorded: 4 Gold: not recorded
Write your program below and press Run. Each run is checked against the expected output.
Press Run to see what your program prints.
One possible solution. Other programs that print the same output are correct too.
melting_points = {"Aluminium": 660, "Copper": 1085, "Iron": 1538}melting_points["Tungsten"] = 3422print(f"Tungsten: {melting_points['Tungsten']} °C")print(f"Metals recorded: {len(melting_points)}")print("Gold:", melting_points.get("Gold", "not recorded"))