You've learned how to add comments using the hash symbol (#
). Comments make your code easier to understand and remember.
Engagement Message
Ready to practice organizing code with comments?
Type
Multiple Choice
Practice Question
Which of these is a properly formatted comment in Python?
A. # This calculates the total score B. // This calculates the total score C. /* This calculates the total score */ D. -- This calculates the total score
Suggested Answers
- A - Correct
- B
- C
- D
Type
Fill In The Blanks
Markdown With Blanks
Add comments to explain what each line does:
Suggested Answers
- 100 health
- from enemy
Type
Sort Into Boxes
Practice Question
Sort these lines into the correct boxes:
Labels
- First Box Label: Comments
- Second Box Label: Code
First Box Items
-
Game setup
-
Add bonus
Second Box Items
