-
-
Save TheMuellenator/febd64195828e681985a0746f0908f92 to your computer and use it in GitHub Desktop.
| //Don't change this | |
| var stockTickers: [String: String] = ["APPL" : "Apple Inc", "HOG": "Harley-Davidson Inc", "BOOM": "Dynamic Materials", "HEINY": "Heineken", "BEN": "Franklin Resources Inc"] | |
| //Write your code here. | |
| stockTickers["WORK"] = "Slack Technologies Inc" | |
| stockTickers["BOOM"] = "DMC Global Inc" | |
| //Don't modify this | |
| print(stockTickers["WORK"]!) | |
| print(stockTickers["BOOM"]!) |
var stockTickers: [String: String] = [
"APPL" : "Apple Inc",
"HOG": "Harley-Davidson Inc",
"BOOM": "Dynamic Materials",
"HEINY": "Heineken",
"BEN": "Franklin Resources Inc"
]
func ubdateMyTickers(){
stockTickers["WORK"] = "Slack Technologies Inc"
stockTickers["BOOM"] = "DMC Global Inc"
}
ubdateMyTickers()
print(stockTickers["WORK"]!)
print(stockTickers["BOOM"]!)
var stockTickers: [String: String] = [
"APPL" : "Apple Inc",
"HOG": "Harley-Davidson Inc",
"BOOM": "Dynamic Materials",
"HEINY": "Heineken",
"BEN": "Franklin Resources Inc"
]
stockTickers["WORK"] = "Slack Technologies Inc"
stockTickers["BOOM"] = "DMC Global Inc"
print(stockTickers["WORK"]!)
print(stockTickers["BOOM"]!)
// I wanted to see how the full dictionary looks like
print(stockTickers)
func exercise() {
var stockTickers: [String: String] = [
"APPL" : "Apple Inc",
"HOG": "Harley-Davidson Inc",
"BOOM": "Dynamic Materials",
"HEINY": "Heineken",
"BEN": "Franklin Resources Inc",
]
//Write your code here.
stockTickers["WORK"] = "Slack Technologies Inc"
stockTickers["BOOM"] = "DMC Global Inc"
//Don't modify this
print(stockTickers["WORK"]!)
print(stockTickers["BOOM"]!)
}
exercise()func exercise() {
//Don't change this
var stockTickers: [String: String] = [
"APPL" : "Apple Inc",
"HOG": "Harley-Davidson Inc",
"BOOM": "Dynamic Materials",
"HEINY": "Heineken",
"BEN": "Franklin Resources Inc"
]
//Write your code here.
stockTickers["WORK"] = "Slack Technologies Inc"
stockTickers["BOOM"] = "DMC Global Inc"
//Don't modify this
print(stockTickers["WORK"]!)
print(stockTickers["BOOM"]!)
}
func exerciseDict() {
//Don't change this
var stockTickers: [String: String] = [
"APPL" : "Apple Inc",
"HOG": "Harley-Davidson Inc",
"BOOM": "Dynamic Materials",
"HEINY": "Heineken",
"BEN": "Franklin Resources Inc"
]
//Write your code here. 👇
stockTickers = [
"APPL" : "Apple Inc",
"HOG": "Harley-Davidson Inc",
"BOOM": "DMC Global Inc",
"HEINY": "Heineken",
"BEN": "Franklin Resources Inc",
"WORK": "Slack Technologies Inc"
]
//Don't modify this
print(stockTickers["WORK"]!)
print(stockTickers["BOOM"]!)
}
// Don't change this
exerciseDict()
Check this
func exercise() {