Python Pioneers: A Beginner's Guide 🇪🇹 – Telegram
Python Pioneers: A Beginner's Guide 🇪🇹
8.87K subscribers
345 photos
39 videos
24 files
61 links
Welcome to Python Pioneers: Empowering Ethiopian students to embark on their coding journey. 🚀🌐🗺📱🖥💻🖱🛰

DM 📩 : @MntsntZP
Download Telegram
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 በ# ምልክት ይጀምራሉ እና እስከ 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
👍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
66%
B. x = 5
25%
C. int x = 5
2%
D. declare x as 5
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
🔈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
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
1. What is the result of 10 + 5 in Python?
Anonymous Quiz
3%
A) 13
91%
B) 15
6%
C) 17
0%
D) 20
2. What is the result of 25 - 9 in Python?
Anonymous Quiz
0%
A) 12
9%
B) 15
86%
C) 16
5%
D) 20
3. What is the result of 6 * 4 in Python?
Anonymous Quiz
2%
A) 22
94%
B) 24
3%
C) 26
2%
D) 28
4. What is the result of 16 / 4 in Python?
Anonymous Quiz
3%
A) 2.5
3%
B) 3.0
94%
C) 4.0
0%
D) 5.2
5. What is the result of 18 % 7 in Python?
Anonymous Quiz
11%
A) 1
21%
B) 2
12%
C) 3
56%
D) 4
6. What is the result of 8 ** 2 in Python?
Anonymous Quiz
2%
A) 60
90%
B) 64
5%
C) 68
3%
D) 72
7. What is the result of 27 // 4 in Python?
Anonymous Quiz
66%
A) 6
21%
B) 7
9%
C) 8
5%
D) 9
8. What is the result of 15 + 6 * 3 in Python?
Anonymous Quiz
5%
A) 27
82%
B) 33
4%
C) 39
9%
D) 45
👍1
9. What is the result of (17 - 6) / 2 in Python?
Anonymous Quiz
77%
A) 5.5
11%
B) 6
7%
C) 6.5
5%
D) 7
10. What is the result of 20 % 3 in Python?
Anonymous Quiz
6%
A) 1
76%
B) 2
11%
C) 3
6%
D) 4