Python Pioneers: A Beginner's Guide πŸ‡ͺπŸ‡Ή
8.82K subscribers
346 photos
40 videos
24 files
64 links
Welcome to Python Pioneers: Empowering Ethiopian students to embark on their coding journey.

πŸ“’ Channel: @python_pioneers
πŸ‘₯ Group: @python_pioneers_chat
Download Telegram
πŸ”ˆ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
10%
A) 1
21%
B) 2
13%
C) 3
55%
D) 4
6. What is the result of 8 ** 2 in Python?
Anonymous Quiz
2%
A) 60
89%
B) 64
5%
C) 68
5%
D) 72
7. What is the result of 27 // 4 in Python?
Anonymous Quiz
66%
A) 6
20%
B) 7
9%
C) 8
5%
D) 9
8. What is the result of 15 + 6 * 3 in Python?
Anonymous Quiz
5%
A) 27
81%
B) 33
5%
C) 39
9%
D) 45
πŸ‘1
9. What is the result of (17 - 6) / 2 in Python?
Anonymous Quiz
75%
A) 5.5
12%
B) 6
7%
C) 6.5
5%
D) 7
10. What is the result of 20 % 3 in Python?
Anonymous Quiz
8%
A) 1
75%
B) 2
11%
C) 3
6%
D) 4
αŒ₯α‹«α‰„α‹Žα‰Ή α‰€αˆ‹αˆ αŠα‰ αˆ© αŠ α‹­α‹°αˆπŸ˜Š πŸ‘ or πŸ‘Ž
πŸ‘16πŸ‘Ž2
Good Morning αˆ°α‹Žα‰½! αŠ₯αˆ΅α‰² α‹­αˆ…α‰½αŠ• አጭር αŠ αˆ΅α‰°αˆ›αˆͺ ታαˆͺክ αŠ αŠ•α‰₯ቧቡፒ

You get what you give:

Once, there was a farmer who regularly sold butter to a baker. One day, the baker decided to weigh the butter to see if he was getting the exact amount that he asked for. He found out that he wasn’t, so he took the farmer to court.

The judge asked the farmer if he uses any measure to weigh the butter. The farmer replied, β€˜Your Honor, I’m primitive. I don’t have a proper measure, but I do have a scale.’

The judge replied, β€œThen how do you weigh the butter?”

The farmer replied; β€œYour Honor, long before the baker started buying butter from me, I have been buying a pound loaf of bread from him. Every day, when the baker brings the bread, I put it on the scale and give him the same weight in butter. If anyone is to be blamed, it’s the baker.’

Moral of the story:In life, you get what you give. Don’t try to cheat others.

መልካም α‰€αŠ• α‹­αˆαŠ•αˆ‹α‰½αˆ!

#EnglishStories

@python_pioneers
@python_pioneers
❀5πŸ‘3πŸ‘1
Our next lesson will be about Indentation in Python! Make sure to join us to learn more about this important concept in programming.

PythonαŠ• α‰ αŠ αˆ›αˆ­αŠ› ከαŠ₯αŠ› αŒ‹αˆ­ α‹­αˆ›αˆ©!

@python_pioneers
@python_pioneers
πŸ‘1
⚑️⚑️⚑️⚑️⚑️⚑️⚑️⚑️⚑️⚑️⚑️⚑️
INDENTATION IN PYTHON

Indentation α‹ˆα‹­αˆ (code αˆ΅αŠ•α…α αŒˆα‰£ α‰₯ሎ αˆ˜αŒ€αˆ˜αˆ­) α‰ αˆŒαˆŽα‰½ programming languages ለreadability αŠα‹ αˆαŠ•αŒ α‰€αˆ˜α‹ ( code α‰ α‰€αˆ‹αˆ‰ αŠ₯αŠ•α‹΅αŠα‰ α‰₯αˆαŠ• αˆ›αˆˆα‰΅ αŠα‹)

ነገር αŒαŠ• α‰ Python indentation ለreadability α‰₯ቻ αˆ³α‹­αˆ†αŠ• α‹¨α‰‹αŠ•α‰‹α‹ syntax αˆ˜αˆ°αˆ¨α‰³α‹Š αŒˆα…α‰³ αŠα‹α’

1. Indentation Basics::

- Indentation የcode blocks αˆ΅α‹α‰΅ αˆαŠ• α‹«αˆ…αˆ αŠ₯αŠ•α‹°αˆ†αŠ αˆˆαˆ›αˆ³α‹¨α‰΅ α‹­αŒ α‰…αˆ›αˆ

- It's typically αŠ αˆ«α‰΅ spaces per level of indentation, αŒαŠ• αŠ αŠ•α‹³αŠ•α‹΅ αˆ°α‹ α‹°αŒαˆž tab prefer α‹«αˆ¨αŒ‹αˆ (which are equivalent to four spaces in python).

- Consistent indentation is crucial for Python code to function correctly.

2. Code Blocks:

- Code blocks α‹¨αˆαŠ•αˆ‹α‰Έα‹ αŠ αŠ•α‹΅ αˆ‹α‹­ grouped α‹¨αˆ†αŠ‘ codes section αŠα‹α’ ለምሳሌ within loops, conditionals, and functions

- α‰ Python, code blocks defined α‹¨αˆšαˆ†αŠ‘α‰΅ αŠ₯αŠ•α‹°αˆŒαˆŽα‰½ programming languages α‰ curly braces ('{}') α‹ˆα‹­αˆ α‰ key words αˆ³α‹­αˆ†αŠ• α‰ indentation αŠα‹α’

3. Example:


   if condition:
# This block is indented under the if statement.
statement1
statement2
else:
# This block is indented under the else statement.
statement3


4. Indentation Errors:

- α‰ α‰΅αŠ­αŠ­αˆ indent αŠ αˆˆαˆ›α‹΅αˆ¨αŒ αŠ₯αŠ“ spaces and tabs mix αˆ›α‹΅αˆ¨αŒ syntax error αŠ₯αŠ•α‹²αˆαŒ αˆ­ α‹«α‹°αˆ­αŒ‹αˆα’

- Python α‰ αƒααŠα‹ code α‹αˆ΅αŒ₯ የindentation α‰½αŒαˆ­ ካለ 'IndentationError' raise α‹«α‹°αˆ­αŒ‹αˆα’

5. Best Practices:

- Use a consistent indentation style throughout your codebase.

- Most Python codebases use four spaces for each level of indentation.

- Use an editor or IDE that automatically converts tabs to spaces to avoid indentation issues.

Remember, α‰ python indentation α‹¨αƒααŠα‹ code αŠ₯αŠ•α‹²αŠα‰ α‰₯ αˆˆαˆ›α‹΅αˆ¨αŒ α‰₯ቻ α‹¨αˆšαŒ α‰…αˆ αˆ³α‹­αˆ†αŠ• α‹¨α‰‹αŠ•α‰‹α‹ α‰ αŒ£αˆ αŠ αˆ΅αˆαˆ‹αŒŠ የsyntax part αŠα‹α£ αŠ₯αŠ“αˆ you have to pay attention to it.


@python_pioneers
@python_pioneers
❀2⚑1