Python Pioneers: A Beginner's Guide 🇪🇹 – Telegram
Python Pioneers: A Beginner's Guide 🇪🇹
8.88K 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
CONTROL FLOW IN PYTHON

Program flow ተራ በተራ የሚከሰት ነው፣ በPython የPython interpreter የተፃፈውን program የሚያነበው አሁን እናንተ ይሄን post እንደምታነቡት sequentially ነው፣ በአንድ ጊዜ አንድ መስመር፣ ከግራ ወደቀኝ እና ከላይ ወደ ታች ማለት ነው።

Interpreterኡ operations እና functions execute የሚያረገው በተቀመጡበት order ሲያገኛቸው ነው። ይሄ ነው ታዲያ Control Flow የምንለው።

ያለ Control Flow expressions አንድ program sequentially executed የሚሆኑ lists of statements ነው። ነገር ግን Control Flow በመጠቀም የተወሰኑ code blocks conditionally(ወይም በቅድመ ሁኔታ) እና repeatedly(ወይም በተደጋጋሚ) executed እንዲሆኑ ማድረግ እንችላለን፣ ይህ ደግሞ በጣም ውስብስብ የሆኑ codes እንድንፅፍ እድል ይሰጠናል።

Python በአንድ program ውስጥ Control Flow ለመፍጠር if, elif( short for else if) እና else የመሳሰሉትን keywords ይጠቀማል። እነዚህ keywords ደግሞ እንደ traffic ተቆጣጣሪ Control Flow ወዴት እንደሚሄድ ይነግራሉ።

Keywords in Python are reserved words that have a specific meaning and purpose in the language.

የዛሬው ትምህርታችን እዚህ ላይ ያልቃል በቀጣይ ስለ እያንዳንዱ Control Flow expression በጥልቀት እናያለን።

#FlowContro

@python_pioneers
@python_pioneers
👍3
Watch the vedio we uploaded below to understand more about flow control 👇👇👇👇
👍1💔1
✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️✝️

እንኳን ለኢየሱስ ክርስቶስ የትንሳኤ በዓል መታሰቢያ በሰላም አደረሳችሁ!

መልካም ፋሲካ!

ፋሲካ ግን ትርጉሙ ምንድነው?

@python_pioneers
@python_pioneers
5🙈2👍1
Flow Control in Python

-Continued lesson

...pending


በዚህኛው ትምህርታችን ስለ እያንዳንዱ Flow Control expressions in Python በdetail እናያለን።

1. if statement:

if statement በጣም በብዙ የሚታወቅ control flow statement type ነው፣ የተለያዩ conditions በማየት conditionኡን የሚያሟላው code block executed እንዲሆን ያደርጋል።

ለምሳሌ:

የ አንድ a የሚባል variable value negative ወይም positive እንደሆነ ለማወቅ ፈልገናል እንበል፣ ሰለዚህ ሁለቱንም conditions( ቅድመ ሁኔታዎች) set ለማረግ if statement እንጠቀማለን። a ከ 0 በላይ ከሆነ "It's positive" ወይም a ከ 0 የሚያንስ ከሆነ "It's negative" ብሎ print እንዲያደርግልን ማለት ነው።

set ያረግነው condition እውነት ከሆነ የዛ block code executed ይሆናል፣ ወይም conditionኡ ሀሰት ከሆነ ያ code block ignore ይደረጋል።

Here is the code for the above case:

a = 20
if a>0:
print("It is Positive")



Output:

It's Positive ምክኒያቱም 20 ከ 0 የሚበልጥ ቁጥር ስለሆነ conditionኡ እውነት ነው፣ ሰለዚህ the block of code within it is executed, in this case "It is Positive".

the other case:

if a<o:
print("It is Negative")


እዚህ ጋር እንደምታዩት ደግሞ conditionኡ ሀሰት ስለሆነ Interpreterኡ code blockኡን ignore ያረገዋል: so the statement within it executed አልሆነም።


Next: elif and else

Stay Tuned!

#FlowControl
#If

@python_pioneers
@python_pioneers
👍6
What is the digital language you learned first?

If it is not listed here, comment it.
Anonymous Poll
30%
HTML
25%
Python
7%
JavaScript
34%
C++
3%
Java
1%
Ruby
1👍1
90 Votes so far and C++ is leading....
This media is not supported in your browser
VIEW IN TELEGRAM
Buggy Buggy 😔😔😔😁😁

Let's have some fun! 😊

#Fun

@python_pioneers
😁4
Story Time

Please read it patiently!

A Wise Man’s Jokes:

A wise man once faced a group of people who were complaining about the same issues over and over again. One day, instead of listening to the complaints, he told them a joke and everyone cracked up laughing.

Then, the man repeated the joke. A few people smiled.

Finally, the man repeated the joke a third time–but no one reacted.

The man smiled and said, “You won’t laugh at the same joke more than once. So what are you getting from continuing to complain about the same problem?”

The Moral:

You’re not going to get anywhere if you keep complaining about the same problem but do nothing to fix it. Don’t waste your time complaining, expecting other people to continue to react to your complaints. Instead, take action to make a change.

መልካም ምሽት!

#EnglishStories

@python_pioneers
4👍3
በቀጣይ: IF-ELSE STATEMENT IN PYTHON

Stay Tuned!

@python_pioneers
@python_pioneers
Here is the data from the survey we conducted regarding the first digital language our channel members learned.

Most of the voters learned C++ first.

147 votes so far

@python_pioneers
1😁1
IF-ELSE STATEMENT IN PYTHON

በባለፈው ትምህርታችን ስለ if statement in python ማለትም አንድ condition ላይ በመመስረት የconditionኡን Truth value በማየት የተለያዩ code blocks run እንድናረግ እንደሚረዳን በትንሹም ቢሆን አይተናል፣ ዛሬ ደግሞ ከዛ የቀጠለውን ትምህርት እንማራለን።

ይህ የ if-else statement ለ decision-making ከsimple if statement የሚሻል አግልግሎት ይሰጣል። ከif statement ጋር በተመሳሳይ መንገድ ነው የሚሰራው ነገር ግን የsimple if statement condition Truth value False(ሀሰት) ከሆነ ምንም ነገር አናገኝም(nothing will be printed) ማለትም it does nothing: ነገር ግን if-else statement ስንጠቀም የif condition False ከሆነ የelse block ውስጥ ያለው expression executed ይሆናል።

እስኪ በምሳሌ እንየው:

አንድ kutir የሚባል variable አለን እንበል፣ እናም ለvariable assign የተደረገው ቁጥር even እንደሆነ እናረጋለን።
So here is the code for it: መጀመሪያ ለvariableኡ የሰጠነው value 4 ነው። የተጠቀምነው condition ደግሞ (kutir % 2 == 0) ነው፣ ይህ ደግሞ variableኡ ውስጥ የተያዘው ቁጥር even እንደሆነ check ለማድረግ ነው(A number is even if it is divided by two without a remainder)

Here is the code:

kutir = 4

if kutir % 2 == 0:
print("kutir is Even")


Output : kutir is Even


እዚህ ጋር conditionኡ እውነት ስለሆነ( 4 even ስለሆነ) the block of code inside the if statement is executed in this case "kutir is Even" printed ይሆናል።

ግን እሺ what will happen if we change the value of the variable to 3?

የvariableኡ value 3 ከሆነ the condition becomes False ያ ማለት the statement under if block is not executed( nothing will be printed) ማለት ነው። እዚህ ጋር ነው ታዲያ else block የሚያስፈልገው።


kutir = 3

if kutir % 2 == 0:
print("kutir is Even")


Output :

ከላይ ያለውን code if-else statement ተጠቅመን ከፃፍነው።የ if statement condition False ስለሆነ፣ else block ውስጥ ያለው code executed ይሆናል ማለት ነው። ቁጥሩ even ካልሆነ "kutir is not even" የሚል text printed እንዲሆንልን ከፈለግን እንደዚህ መፃፍ እንችላለን።

kutir = 3

if kutir % 2 == 0:
print("kutir is Even")
else:
print("kutir is not Even")


Output :kutir is not Even


3 even ስላልሆነ if block ውስጥ ያለው code ይዘለልና else block ውስጥ ያለው code executed ይሆናል-> "kutir is not Even" printed ይሆናል ማለት ነው።

ቀጣይ: if..elif..else

Pythonን በአማርኛ እንማር!

#IfElse

@python_pioneers
@python_pioneers
2👍2
Here are some beautiful programming related wallpapers.

Enjoy Them!⚡️⚡️⚡️⚡️

#wallpapers

@python_pioneers
🔥31👍1👌1