
W2-L1-Comments-in-Python-Programming
Presentation
•
Computers
•
6th Grade
•
Hard
Hatoof ATS
Used 3+ times
FREE Resource
7 Slides • 6 Questions
1
Comments and
Variables in Python
In this lesson, we'll explore the essential concepts of comments and
variables in Python programming, which are crucial for writing clear and
organized code.
by Hatoof Ababneh
2
Warm Up Activity: Guessing Game
Instructions
Think of a number between 1 and
10. Your partner will try to guess
your number.
Rules
You can only say "higher" or
"lower" after each guess.
Goal
See who can guess the number in
the fewest tries!
3
What are Comments?
Definition
Comments are notes within your code that are ignored by
the computer. They're meant for humans to understand the
code better.
# This is a comment
print("Hello, world!")
Example
go to https://www.programiz.com/python-programming/online-compiler and write the above example .
4
5
Importance of
Comments
Clarity
Comments help explain what
your code does, making it
easier to understand.
Organization
They can break down complex
code into smaller, more
manageable sections.
Collaboration
Comments make it easier for others to work on your code or
understand your logic.
6
Comment Syntax in Python
Hash Symbol
Start a comment with a '#' symbol. Everything after the '#' on
the same line is a comment.
Multiline Comments
For multiline comments, use triple quotes ('''comment here''')
7
Lets take a quick QUIZ
8
Multiple Choice
Which of the following lines of code are correct?
Print('Hello world!')
print('Hello world!')
print(Hello world!)
print 'Hello world!'
9
Multiple Select
What is the purpose of comments in Python code?
To explain the code
To make the code more readable
To prevent execution when testing code
All of the above
10
Multiple Choice
How can multi-line comments be added in Python?
By using the # symbol for each line
By using triple quotes (""")
By using the // symbol at the beginning of each line
By using the /* */ symbols
11
Multiple Select
Which of the following is true about comments
Comments are used by programmers to document the code
# is used to create a comment in python
''' can be used to create a comment in python
/* */ can be used to crate a comment in python
Python ignores comments.
12
Multiple Choice
13
Multiple Choice
Comments and
Variables in Python
In this lesson, we'll explore the essential concepts of comments and
variables in Python programming, which are crucial for writing clear and
organized code.
by Hatoof Ababneh
Show answer
Auto Play
Slide 1 / 13
SLIDE
Similar Resources on Wayground
9 questions
Han Dynasty
Presentation
•
6th Grade
8 questions
Causes of World War I
Presentation
•
6th Grade
8 questions
Distributive Property
Presentation
•
6th Grade
11 questions
Graphical Representations of Data
Presentation
•
6th Grade
11 questions
Characterization
Presentation
•
6th Grade
7 questions
Vague Pronouns
Presentation
•
6th Grade
10 questions
Inferencing
Presentation
•
5th - 6th Grade
10 questions
Body Movements
Presentation
•
6th Grade
Popular Resources on Wayground
5 questions
A Home on the Shore
Quiz
•
3rd Grade
28 questions
US History Regents Review
Quiz
•
11th Grade
6 questions
A Horse Tale
Quiz
•
3rd Grade
20 questions
Math Review
Quiz
•
3rd Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
20 questions
Dividing Fractions
Quiz
•
5th Grade
55 questions
A Long Walk to Water Final Review
Quiz
•
6th - 8th Grade
10 questions
Equation Word Problems
Quiz
•
7th Grade
Discover more resources for Computers
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
55 questions
A Long Walk to Water Final Review
Quiz
•
6th - 8th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
10 questions
Static and Dynamic Characters
Quiz
•
6th Grade
42 questions
ELA Final Exam Review
Quiz
•
6th Grade
23 questions
Potential and Kinetic Energy
Quiz
•
6th Grade
20 questions
All About Chicken Nuggets
Quiz
•
6th Grade
28 questions
A Rover's Story, part 1
Quiz
•
6th - 8th Grade