How do I get this code to print the following | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do I get this code to print the following

https://code.sololearn.com/cRQh6xjpSBD2/?ref=app

21st Feb 2023, 8:44 PM
Emmanuel Pena
2 Answers
+ 5
// Hope this code helps you var dict = ["WORK": "Slack Technologies Inc"] var stockTickers: [String: String]=[ "APPL" : "Apple Inc", "HOG" :"Harley-Davidson Inc", "BOOM" : "Dynamic Materials", "HEINY" : "Heineken", "BEN" : "Flanklin Resources Inc"] func exercise() { print(dict["WORK"]!) print(stockTickers["BOOM"]!) let k: String = "MrBEN" print("\nDoes key exist ? \(stockTickers.contains{ $0.key == k })") } exercise()
21st Feb 2023, 9:44 PM
SoloProg
SoloProg - avatar
+ 1
Thank you so much bro 🫡
22nd Feb 2023, 11:37 AM
Emmanuel Pena