
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
10 questions
Solving Percent Problems
Presentation
•
6th Grade
10 questions
Divide Fractions
Presentation
•
6th Grade
9 questions
Comma Rules
Presentation
•
6th Grade
8 questions
M1 Введение в программирование
Presentation
•
6th Grade
7 questions
Flowcharts
Presentation
•
6th Grade
10 questions
French- Les Conjunctions
Presentation
•
6th Grade
10 questions
Sedimentary Rock
Presentation
•
6th Grade
10 questions
Grade 6 - Evaluating Expressions
Presentation
•
6th Grade
Popular Resources on Wayground
20 questions
"What is the question asking??" Grades 3-5
Quiz
•
1st - 5th Grade
20 questions
“What is the question asking??” Grades 6-8
Quiz
•
6th - 8th Grade
10 questions
Fire Safety Quiz
Quiz
•
12th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
34 questions
STAAR Review 6th - 8th grade Reading Part 1
Quiz
•
6th - 8th Grade
20 questions
“What is the question asking??” English I-II
Quiz
•
9th - 12th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
47 questions
8th Grade Reading STAAR Ultimate Review!
Quiz
•
8th Grade