Explore what CodeHS has to offer for districts, schools, and teachers.
Click on one of our programs below to get started coding in the sandbox!
View All
What will the following code print to the console when it runs?
ghosts = { "Red Ghost" : "Blinky", "Pink Ghost" : "Pinky", "Blue Ghost" : "Inky", "Orange Ghost" : "Clyde" } for ghost in ghosts: print(ghosts[ghost])
Blinky Pinky Inky Clyde
Red Ghost Pink Ghost Blue Ghost Orange Ghost
Red Ghost : Blinky Pink Ghost : Pinky Blue Ghost : Inky Orange Ghost : Clyde
Red Ghost Blinky Pink Ghost Pinky Blue Ghost Inky Orange Ghost Clyde