about | help | code help+videos | done | prefs |
Given a map of food keys and their topping values, modify and return the map as follows: if the key "ice cream" has a value, set that as the value for the key "yogurt" also. If the key "spinach" has a value, change that value to "nuts". topping2({"ice cream": "cherry"}) → {"yogurt": "cherry", "ice cream": "cherry"} topping2({"spinach": "dirt", "ice cream": "cherry"}) → {"yogurt": "cherry", "spinach": "nuts", "ice cream": "cherry"} topping2({"yogurt": "salt"}) → {"yogurt": "salt"} ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 215
Copyright Nick Parlante 2017 - privacy