Python Development Course
Chapter
>
Level
Variables and Types
Commenting Code
Objective
Modify comments in the code editor in order to reach the exit.
The path forward should be pretty easy, but there are a lot of obstacles in the way. There looks to be a few possible ways to move forward but really there’s just one.
The code editor has the code already written down to reach the exit, but it’s all jumbled with code that doesn’t belong and code that isn’t run because it’s commented. In order to reach the exit you must learn how to add or remove comments.
# player.speak("This code is commented") player.speak("This code is not commented")
The above code illustrates commented and non commented code, any code that is commented is ignored when the game is run. By adding a # any code after the pound in that line will be commented. By removing the # form a line of code the line will be executed.
The solution to the level is already in the code editor. Comment and un-comment the correct lines of code to reach the end of the level.