Python Pioneers: A Beginner's Guide 🇪🇹
Open in Telegram
Welcome to Python Pioneers: Empowering Ethiopian students to embark on their coding journey. 📢 Channel: @python_pioneers 👥 Group: @python_pioneers_com
Show more8 874
Subscribers
No data24 hours
-277 days
-13630 days
Posts Archive
Repost from ATC NEWS
🚀 Gain the Skills and International Certifications You Need for Remote Work 🌍
Upwork, Toptal, and more - ever wondered what it takes to secure remote work through these top platforms?
Discover ALX’s dynamic online tech courses, tailored to meet today’s job market demands. Whether you’re starting out or looking to deepen your expertise, we offer a variety of courses, including:
AWS Cloud Computing
Back-End Web Development
Front-End Web Development
Data Analytics
Salesforce
💡 Start with our 100% free, two-month-long “ALX Foundations” program - a gateway to these advanced courses for a nominal admin fee! 🔥
🌟 Ready to lead in the tech industry? Secure your spot now at www.alxethiopia.com.
Let’s ignite your career journey!
Application deadline: July 2nd, 2024
#InnovateYourPath #FutureReady #SkillUp
29 Jun 2024, 05:16
For Python beginners, this book is a must-have.
-Someone
#Books
@python_pioneers
20 Jun 2024, 06:52
Repost from Python Pioneers: A Beginner's Guide 🇪🇹
Explore the Lessons We've Been Learning: Click the Links Below to Dive into Various Topics
04 Jun 2024, 03:15
Let me share with you some beautiful and powerful quotes that I gathered from different sources.
People were created to be loved. Things were created to be used. The reason why the world is in chaos, is because things are being loved and people are being used.- John Green
You get a strange feeling when you're about to leave a place. Like you'll not only miss the people you love but you'll miss the person you are now at this time and this place, because you'll never be this way ever again.- Azar Nafisi
People ask if you have graduated, if you have married, if you have kids, as if life is like a checklist. No one asks you if you're happy- Criolo
If you get tired, learn to rest, not to quit.- Banksy
The sun does not forget a village just because it is small.- African Proverb
A bird sitting on a tree is never afraid of the branch breaking, because its trust is not on the branch but on its own wings. Always believe in yourself- Anonymous
Raise your words, not your voice. It is rain that grows flowers, not thunder.- Rumi
If you think you are too small to make a difference, try to sleep with a mosquito in a room.- Dalai Lama
You can't keep blaming yourself. Just blame yourself once and move on.- Homer Simpson Have a nice day! @python_pioneers @python_pioneers
30 May 2024, 10:31
Common Use Cases
1. Waiting for User Input: የፈለግነውን data እስከምናገኝ User input በተደጋጋሚ እንድንቀበል ይረዳናል።
2. Processing Data Streams: መጨረሻ ላይ እስከምንደርስ data ከfile ወይም ከ network stream continuously እንድናነብ ይረዳናል።
3. Polling: የአንድን resource status periodically check እንድናረግ ይረዳናል።
ምሳሌ: User Input
Here's an example where we keep asking the user for a positive number:
number = -1
while number < 0:
number = int(input("Enter a positive number: "))
print(f"You entered: {number}")
ከላይ ያለው ፕሮግራም userኡ positive ቁጥር እንዲያስገባ repeatedly ይጠይቀዋል፣ ቁጥሩን ደግሞ print ያረጋል፣ if the user enters a positive number the loop ends, because the condition becomes false.
...to be continued
@python_pioneers
@python_pioneers29 May 2024, 04:08
😂😂😂😂😂😂😂😂😂
-> @lewtayew
@python_pioneers
28 May 2024, 09:20
Infinite Loop
A common pitfall with while loops is creating an infinite loop, where the condition never becomes false.
Example of an infinite loop:
while True:
print("This will print forever")
Breaking Out of a Loop
Infinite Loop avoid ለማረግ "break" statement መጠቀም እንችላለን፣ ይህም የሆነ condition set አርገን እውነት በሚሆንበት ጊዜ loopኡን exit እንድናረግ ይረዳናል።
i = 1
while i <= 10:
print(i)
if i == 5:
break # Exit the loop when i is 5
i += 1
ከላይ ያለው ፕሮግራም መጀመሪያ የተፃፈው ከ 1 እስከ 10 ያሉ ቁጥሮችን print እንዲያረግ ቢሆንም የ'i' value 5 ሲሆን እንዲያቆም ቅድመ-ሁኔታ ስላስቀመጥን loopኡ ይቆማል።
Using Else with While Loop
Python 'else' clause ከ while loop ጋር እንድንጠቀም ይፈቅዳል። የ'else' block executed የሚሆነው የ while loop condition ሀሰት ሲሆን ነው። (i.e., the loop terminates naturally).
ምሳሌ
i = 1
while i <= 5:
print(i)
i += 1
else:
print("Loop has ended")
...ይቀጥላል
@python_pioneers
@python_pioneers28 May 2024, 05:10
https://t.me/tapswap_mirror_1_bot?start=r_6163528558 🎁 +2.5k Shares as a first-time gift
25 May 2024, 01:51
ሁላችሁንም ስለተሳትፏችሁ በጣም እናመሰግናለን!
በቴክኖሎጂው ዘርፍ ብቁ የሆነ ትውልድ ማፍራት ነጌ ላይ አድጋ ልናያት የምንፈልጋትን ኢትዮጵያ ለመገንባት ዋነኛ አማራጭ ነው።
መልካም ምሽት!
@python_pioneers
@python_pioneers
24 May 2024, 14:14
10. What will be the output of the following code?
Copy code
x = 0
while x < 4:
x += 1
print(x)
A) 0 1 2 3
B) 1 2 3 4
C) 0 1 2 3 4
D) 1 2 324 May 2024, 13:54
10. Which of the following statements will cause an infinite loop?
A)
i = 0
while i < 5:
print(i)
i += 1
B)
```python
i = 0
while True:
print(i)
i += 1
if i >= 5:
break
C)python i = 0 while i < 5: print(i)
D)python i = 0 while i < 5: print(i) i += 1 if i == 3: break
`24 May 2024, 13:51
24 May 2024, ~13:52
10. Which of the following statements will cause an infinite loop?
A)
i = 0
while i < 5:
print(i)
i += 1
B)
```python
i = 0
while True:
print(i)
i += 1
if i >= 5:
break
C)python i = 0 while i < 5: print(i)
D)python i = 0 while i < 5: print(i) i += 1 if i == 3: break
`24 May 2024, 13:50
24 May 2024, ~13:51
9. What is the purpose of the following
while loop?
n = 10
while n > 0:
n -= 1
A) To count up from 1 to 10
B) To count down from 10 to 1
C) To count down from 10 to 0
D) To count up from 0 to 1024 May 2024, 13:50
8. What will be the value of
sum after the execution of the following code?
sum = 0
i = 1
while i <= 5:
sum += i
i += 1
A) 10
B) 15
C) 20
D) 524 May 2024, 13:49
6. How many times will "Hello, World!" be printed?
count = 5
while count > 0:
print("Hello, World!")
count -= 1
A) 6
B) 5
C) 4
D) Infinite24 May 2024, 13:48
Comment your answers from now on...
6. What is the output of the following code?
i = 0
while i < 3:
print(i)
i += 1
A) 0 1 2
B) 0 1 2 3
C) 1 2 3
D) 0 124 May 2024, 13:46
5. How is the condition in a while loop written in Python?
24 May 2024, 13:42
