New Page
# 1a. Dictionary maken en printen
fruit_dictionary = {
"appel": "apple",
"peer": "pear",
"mandarijn": "mandarin",
"sinaasappel": "orange",
"druif": "grape",
"banaan": "banana"
}
print("1a:", fruit_dictionary)
# 1b. Print de peer en de sinaasappel
print("1b:", fruit_dictionary["peer"])
print("1b:", fruit_dictionary["sinaasappel"])
# 1c. Print alle keys
print("1c:", fruit_dictionary.keys())
# 1d. Print alle values
print("1d:", fruit_dictionary.values())
# 1e. Print alle items in het formaat: appel -> apple
print("1e:")
for key, value in fruit_dictionary.items():
print(f"{key} -> {value}")
# 1f. Voeg watermeloen toe
fruit_dictionary["watermeloen"] = "watermelon"
print("1f:", fruit_dictionary)
# 1g. Verwijder de druif
del fruit_dictionary["druif"]
print("1g:", fruit_dictionary)