Retrieving Keys and Values

I’m stuck on the “Retrieving Keys and Values” exercise. I can get the sentence to display correctly, but my answer is still marked wrong. And this isn’t the first time I’ve run into this problem on this site.

fun main() {
var uniqueTransport = mapOf(“India” to “Tuktuk”, “Egypt” to “Felucca”, “Peru” to “Totora Boat”, “Hong Kong” to “Junk Boat”)

// Write your code below
var key = “Peru”
println(“A unique mode of transportation that exists in Peru is ${uniqueTransport[key]}.”)
}

Hi there, welcome to the forums.

Could you please provide a link to the exercise you’re working on? :slight_smile:

https://www.codecademy.com/courses/learn-kotlin/lessons/kotlin-maps/exercises/retrieving-keys-and-values

Thanks for responding, but I was able to figure out the answer.

1 Like

Glad to hear it. :slight_smile:

1 Like