Python Pioneers: A Beginner's Guide ๐Ÿ‡ช๐Ÿ‡น
8.63K 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
๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚

-> @lewtayew

#Fun

@python_pioneers
๐Ÿ˜4๐Ÿ‘1
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("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

#WhileLoop

@python_pioneers
@python_pioneers
๐Ÿ‘2
๐Ÿ‘‹ 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!

#Quotes

@python_pioneers
@python_pioneers
โค7๐Ÿ‘2๐Ÿ”ฅ1๐Ÿ™1๐Ÿ˜Ž1
Fun_damentals_of_Python_Book_by_Bemnet_Girma_1715444510.pdf
10.6 MB
For Python beginners, this book is a must-have.

-Someone

#Books

@python_pioneers
๐Ÿ‘4โค1
Forwarded from ATC NEWS (MuJa. M)
๐Ÿš€ 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
๐Ÿ‘1
แˆฐแˆ‹แˆ แŠฅแŠ•แ‹ฐแˆแŠ• แ‰†แ‹ซแ‰ฝแˆ แ‹จแ‰ปแАแˆ‹แ‰ฝแŠ•แข แ‹จ @python_pioneers Subscribers!

แˆณแŠ•แŒˆแŠ“แŠ แ‰ฅแ‹™ แ‰†แ‹ญแ‰ฐแŠ“แˆแฃ แŒแŠ• แ‰ แ‹šแˆ… แŠญแˆจแˆแ‰ต แ‰ตแˆแˆ…แˆญแ‰ณแ‰ฝแŠ•แŠ• แŠฅแŠ•แ‰€แŒฅแˆ‹แˆˆแŠ•แฃ แˆ›แŠ•แŠ›แ‹แˆ แŠ แ‹ญแАแ‰ต แŒฅแ‹ซแ‰„ แ‹ˆแ‹ญแˆ แ‹ญแˆ„แŠ• แ‰ฅแ‰ณแˆจแŒ‰แฃ แ‰ฅแ‰ตแŒจแˆแˆฉ แ‰ฅแˆ‹แ‰ฝแˆ แ‹จแˆแ‰ณแˆตแ‰กแ‰ตแŠ• suggestion แŠจแˆ˜แˆตแŒ แ‰ต แ‹ˆแ‹ฐแ‹ƒแˆ‹ แŠ แ‰ตแ‰ แˆ‰แข

แ‰ แ‹šแˆ… แŠญแˆจแˆแ‰ต แŠฅแ‹šแˆ… แ‰ปแАแˆ แˆ‹แ‹ญ แ‹จแˆšแƒแ‰ แŠฎแŠ•แ‰ฐแŠ•แ‰ถแ‰ฝ:

โ–ซ๏ธContd lessons on Python
โ–ซ๏ธAward-winning questions and quizzes
โ–ซ๏ธTech related news
โ–ซ๏ธLive sessions
โ–ซ๏ธDaily inspiring quotes
โ–ซ๏ธTech related stuffs
โ–ซ๏ธ...

แ‰ แ‹šแˆ… แŠญแˆจแˆแ‰ต แ•แˆฎแŒแˆซแˆแŠ•แŒ แ‹จแˆ˜แˆ›แˆญ แˆ€แˆณแ‰ฅ แŠซแˆ‹แ‰ฝแˆ แ‹ญแˆ… แ‰ปแАแˆ แŠ แˆชแ แАแ‹แฃ แŠจแŠฅแŠ› แŒ‹แˆญ แ‰ แˆ˜แˆ›แˆญ แŠญแˆจแˆแ‰ณแ‰ฝแˆแŠ• แแˆฌแ‹ซแˆ› แŠฅแŠ•แ‹ฐแˆแ‰ณแ‹ฐแˆญแŒ‰แˆ แŠฅแˆญแŒแŒ แŠžแ‰ฝ แАแŠ•แข


แˆ˜แˆแŠซแˆ แŒŠแ‹œ แ‹ญแˆแŠ•แˆ‹แ‰ฝแˆ!


@python_pioneers
@python_pioneers
๐Ÿ‘4โค1
Control Flow Modifiers in Python

แ‰ python Control flow modifiers แ‹จแˆแŠ•แˆ‹แ‰ธแ‹ แ‰ loop แ‹ˆแ‹ญแˆ แ‰ conditional statements แ‹แˆตแŒฅ แŠจแŒˆแ‰ก normal flow of executionแŠ• แ‹จแˆšแ‰€แ‹ญแˆฉ statementแŠฆแ‰ฝ แŠ“แ‰ธแ‹แข
แŠฅแАแ‹šแˆ…แˆ modifiers แŠฅแА break, continue, แŠฅแŠ“ pass แŠ“แ‰ธแ‹

1. break Statement
แ‹ญแˆ…แŠ• แ‹จ break statement แ‹จแˆแŠ•แŒ แ‰€แˆ˜แ‹ แŠ แŠ•แ‹ตแŠ• loop prematurely แ‹ˆแ‹ญแˆ แˆ˜แŒจแˆจแˆป แˆ‹แ‹ญ แˆณแ‹ญแ‹ฐแˆญแˆต แˆˆแˆ›แ‰†แˆ แˆตแŠ•แˆแˆแŒ แАแ‹แข แŠฅแŠ“แˆ loopแŠก terminate แ‹ซแˆจแŒแŠ“ แŠจloopแŠก แ‰€แŒฅแˆŽ แˆ˜แŒ€แˆ˜แˆชแ‹ซ แ‹ซแˆˆแ‹ line of code executed แ‹ญแˆ†แŠ“แˆแข


- แˆˆแˆแˆณแˆŒ:

  for i in range(10):
if i == 4:
break
print(i) # Output: 0, 1, 2, 3


2. continue Statement

แ‹ญแˆ…แŠ›แ‹ modifier แ‹ฐแŒแˆž แ‹จloopแŠก current iteration แ‹แˆตแŒฅ แ‹ซแˆˆแ‹แŠ• code แ‹˜แˆˆแŠ• แ‹ˆแ‹ฐ แ‰€แŒฃแ‹ญ iteration แˆˆแˆ›แˆˆแ แˆตแŠ•แˆแˆแŒ แŠฅแŠ•แŒ แ‰€แˆ˜แ‹‹แˆˆแŠ•แข
loopแŠกแŠ• terminate แŠ แ‹ซแˆจแŒˆแ‹แˆ แฃ it just skips the remaining code for the current iteration.


- แˆˆแˆแˆณแˆŒ:

  for i in range(10):
if i % 2 == 0:
continue
print(i) # Output: 1, 3, 5, 7, 9

..to be contd

#break
#continue

@python_pioneers
@python_pioneers
โค3
...contd

3. pass Statement

It is a no-operation statement in Python
- pass statementแŠ• แ‹จแˆแŠ•แŒ แ‰€แˆ˜แ‹ แŠฅแŠ•แ‹ฐ place holder แАแ‹แข แˆ›แˆˆแ‰ตแˆ แ‹จแˆ†แА code แŠฅแ‹จแƒแ‹แ‰ฝแˆ แŠจแˆ†แА แŒแ‹œ แ‰ แŠƒแˆ‹ แ‹จแˆแ‰ตแŒจแˆแˆฉแ‰ต line of code แŠซแˆˆ 'pass' แŠ• แŠฅแŠ•แ‹ฐ place holder แ‰ตแŒ แ‰€แˆ™แ‰ณแˆ‹แ‰ฝแˆแข

- แˆˆแˆแˆณแˆŒ:

  if condition:
pass # To be implemented later


4. else Clause with Loops

else clause แŠจloop แŒ‹แˆญ แˆ˜แŒ แ‰€แˆ แŠฅแŠ•แ‰ฝแˆ‹แˆˆแŠ•แฃ as long as a break statement is not used.

- แˆˆแˆแˆณแˆŒ:

  for i in range(5):
print(i)
else:
print("Loop completed") # This will be printed because the loop was not terminated by a break


- แˆแˆณแˆŒ : elseแŠ• after break แˆตแŠ•แŒ แ‰€แˆ:

  for i in range(5):
if i == 3:
break
print(i)
else:
print("Loop completed") # This will not be printed because the loop was terminated by a break


แŠฅแАแ‹šแˆ…แŠ• control flow modifiers แˆ˜แˆจแ‹ณแ‰ต แ‹จloops แŠฅแŠ“ conditionals flow manage แ‰ แˆ›แˆจแŒ efficient แŠฅแŠ“ readable code แˆ˜แƒแ แŠฅแŠ•แ‹ตแ‰ตแ‰ฝแˆ‰ แ‹ญแˆจแ‹ณแ‰ฝแŠ‹แˆแข

#pass
#break

@python_pioneers
@python_pioneers
๐Ÿ”ฅ1
แŠฅแˆตแŠช แŠฅแАแ‹šแˆ…แŠ• แŠจflow control modifiers แ‹จแ‹ˆแŒก แŒฅแ‹ซแ‰„แ‹Žแ‰ฝแŠ• แˆžแŠญแˆฏแ‰ธแ‹โญ๏ธ
2. What will be the output of the following code?

   for i in range(5):
if i == 3:
break
print(i)


- A) 0 1 2

- B) 0 1 2 3

- C) 0 1 2 3 4

- D) None of the above
๐Ÿ‘1