GROW THROUGH WHAT YOU GO THROUGH.
แจแแซแแฅแแ แแแแแ แแฐแ แฅแ แแฐแแญแ แแแแญแฃ แแแฐแ แฅแ แแแ แแจแญ แฅแตแ แญแฐแ แแแข แ แแซแแฅแแ แฝแแฎแฝ แจแแแจแญ แแญแ แจแแแฐแต แญแแ แself development แฅแ แฅแซแณแฝแแ แแแปแปแ แฅแแฐ แฅแตแ แ แตแญแแ แแแ แ แ แแฅแแข
แแแซแ แแฝแต!
@python_pioneers
แจแแซแแฅแแ แแแแแ แแฐแ แฅแ แแฐแแญแ แแแแญแฃ แแแฐแ แฅแ แแแ แแจแญ แฅแตแ แญแฐแ แแแข แ แแซแแฅแแ แฝแแฎแฝ แจแแแจแญ แแญแ แจแแแฐแต แญแแ แself development แฅแ แฅแซแณแฝแแ แแแปแปแ แฅแแฐ แฅแตแ แ แตแญแแ แแแ แ แ แแฅแแข
แแแซแ แแฝแต!
@python_pioneers
๐5๐ฅฐ2
Python Pioneers: A Beginner's Guide ๐ช๐น
COMMENTS IN PYTHON Pythonแ แ แ แแญแ แฅแแแญ! Stay Tuned! @python_pioneers
COMMENTS IN PYTHON
แ Pythonแก Comments แ Python interpreter ignore แจแแฐแจแ แแฅแซแชแซแแฝ แแธแแข แจแแแแแ code purpose แแแแแ แฃ แฅแแดแต แฅแแฐแแฐแซแฃ แฅแ แแแฝ แแจแแแฝแ แแแแ แฅแแ แแแธแแแแข Comments are crucial for code readability and maintenance
TYPES OF COMMENTS IN PYTHONแก-
1. Single-Line Commentsแก แฅแแแ comments แ
2. Multi-Line Commentsแก แ Python แฃ แMulti-line comments specific syntax แจแแแข แแแญ แแ แ แฅแแแแ แแ multi-line comments แแแแ แญ triple qoutes(แถแตแต แตแแ แญแฐ แฅแ แต)(''' แแญแ """) แแ แแ แฅแแฝแแแแข
3. Docstringsแก Docstringsแก functions, modules, แฅแ classes document แแแตแจแ แญแ แ แแแข They are enclosed in triple quotes and provide more detailed explanations of the purpose, parameters, and return values of functions.
แแแณแ แญแแแ code แฅแแแแจแตแก
แฅแแ in general comments in any programming languages แจแแซแแแแแต แจแแแแ code แ แแ แแญแแต แแแแต แฅแแฐแแฐแซ แแแแแ แแแฃ แจแแแแแ code แฐแแ แแ แฐแ แฅแแฒแซแจแ share แจแแแจแ แจแแ แจแแซแแ แ แฐแ แจแ แแ แตแ programแก แ แฐแซแญ แฅแแฒแจแณ แซแฐแญแแแข
@python_pioneers
แ Pythonแก Comments แ Python interpreter ignore แจแแฐแจแ แแฅแซแชแซแแฝ แแธแแข แจแแแแแ code purpose แแแแแ แฃ แฅแแดแต แฅแแฐแแฐแซแฃ แฅแ แแแฝ แแจแแแฝแ แแแแ แฅแแ แแแธแแแแข Comments are crucial for code readability and maintenance
TYPES OF COMMENTS IN PYTHONแก-
1. Single-Line Commentsแก แฅแแแ comments แ
# แแแญแต แญแแแซแ แฅแ แฅแตแจ line แแจแจแป แตแจแต แญแแฅแแ แข แฅแแแ
แ แฐแแ แแ แซแญแญ แแฅแซแชแซแแฝ แฅแแ แแแธแแแแข# This is a single-line comment
x = 5 # This is also a single-line comment
2. Multi-Line Commentsแก แ Python แฃ แMulti-line comments specific syntax แจแแแข แแแญ แแ แ แฅแแแแ แแ multi-line comments แแแแ แญ triple qoutes(แถแตแต แตแแ แญแฐ แฅแ แต)(''' แแญแ """) แแ แแ แฅแแฝแแแแข
'''
This is a multi-line comment.
It spans across multiple lines.
'''
3. Docstringsแก Docstringsแก functions, modules, แฅแ classes document แแแตแจแ แญแ แ แแแข They are enclosed in triple quotes and provide more detailed explanations of the purpose, parameters, and return values of functions.
แแแณแ แญแแแ code แฅแแแแจแตแก
def add_numbers(a, b):
"""
This function adds two numbers together.
Parameters:
a (int): The first number.
b (int): The second number.
Returns:
int: The sum of a and b.
"""
return a + b
แฅแแ in general comments in any programming languages แจแแซแแแแแต แจแแแแ code แ แแ แแญแแต แแแแต แฅแแฐแแฐแซ แแแแแ แแแฃ แจแแแแแ code แฐแแ แแ แฐแ แฅแแฒแซแจแ share แจแแแจแ แจแแ แจแแซแแ แ แฐแ แจแ แแ แตแ programแก แ แฐแซแญ แฅแแฒแจแณ แซแฐแญแแแข
@python_pioneers
๐3
There is no straight path to success. The problems we face have the ability to shape us. Grow through them.
HARD WORK
|
|
PROBLEM
|
SETBACK
|
FAILURE
|
CHALLENGE
|
OBSTACLE
|
|
SUCCESS
Have a nice day!
@python_pioneers
HARD WORK
|
|
PROBLEM
|
SETBACK
|
FAILURE
|
CHALLENGE
|
OBSTACLE
|
|
SUCCESS
Have a nice day!
@python_pioneers
๐1
Let's Revise what we have been learning with these questions.
๐๐๐๐๐๐๐๐๐
๐๐๐๐๐๐๐๐๐
1. What is the correct way to declare a variable in Python?
Anonymous Quiz
7%
A. var x = 5
67%
B. x = 5
25%
C. int x = 5
2%
D. declare x as 5
2. What is the purpose of comments in Python code?
Anonymous Quiz
6%
A. To make the code run faster
85%
B. To explain the purpose of the code
6%
C. To hide code from other programmers
2%
D. To declare variables
3. What type of operations can you perform on variables in Python?
Anonymous Quiz
12%
A. Mathematical operations
6%
B. String operations
0%
C. Logical operations
82%
D. All of the above
4. What is the difference between declaring a variable and assigning a value to it in Python?
Anonymous Quiz
19%
A. There is no difference
47%
B. Declaring initializes with a value, assigning a value changes the value of an existing variable
30%
C. Declaring a variable creates a variable, while assigning a value creates a new variable
4%
D. Assigning a value is only done with strings
5. What is the significance of using an underscore (_) in variable names in Python?
Anonymous Quiz
22%
A. It indicates a reserved word
66%
B. It separates words in a variable name
6%
C. It is not allowed in variable names
6%
D. It is used for mathematical operations
๐1
๐New Subscribers
Welcome!
It is good for you if you scroll up and see the previous lessons we have been learning.
Also don't forget to invite your friends ,who are interested in programming, to our channel.
@python_pioneers
Welcome!
It is good for you if you scroll up and see the previous lessons we have been learning.
Also don't forget to invite your friends ,who are interested in programming, to our channel.
@python_pioneers
Python Pioneers: A Beginner's Guide ๐ช๐น pinned ยซ๐New Subscribers Welcome! It is good for you if you scroll up and see the previous lessons we have been learning. Also don't forget to invite your friends ,who are interested in programming, to our channel. @python_pioneersยป
1โฃ0โฃ1โฃ0โฃ1โฃ1โฃ0โฃ1โฃ0โฃ1โฃ1โฃ0โฃ1โฃ1โฃ1โฃ0โฃ1โฃ0โฃ
Test your knowledge about arithmetic operations in python with these easy questions โโโโโ
Test your knowledge about arithmetic operations in python with these easy questions โโโโโ
๐1