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
How do you start the Python interpreter on the terminal?
Anonymous Quiz
14%
A) python start
27%
B) run python
49%
C) python
11%
D) start python
ChatGPT was asked to generate memes that only AI would understand.

If you smiled - think about it. 🤖

#AI

@python_pioneers
😁2
በዚህች አጭር story ደግሞ ምሽታችሁን ብሩህ አርጉ🌌

The Travelers and The Plane Tree

Two men were walking along one summer day. Soon it became too hot to go any further and, seeing a large plane tree nearby, they threw themselves on the ground to rest in its shade. Gazing up into the branches one man said to the other,

"What a useless tree this is. It does not have fruit or nuts that we can eat and we cannot even use its wood for anything."

"Don't be so ungrateful," rustled the tree in reply. "I am being extremely useful to you at this very moment, shielding you from the hot sun. And you call me a good-for-nothing!"

Moral: All of God's creations have a good purpose. We should never belittle God's blessings.

መልካም ምሽት!

#Story

@python_pioneers
6👍3🙏1
📱 PyDroid: Your Python Playground on Android!
ለAndroid ተጠቃሚዎች python codes run ለማረግ ሌላኛው አማራጭ ነው።

🔗 Download the app from Play Store: https://play.google.com/store/apps/details?id=ru.iiec.pydroid3

With PyDroid, you can write, test, and debug Python code with ease, whether you're a beginner or an experienced developer.

Or for arm64 structure you can download the apk file we uploaded below 👇

@python_pioneers
👍1
Being youthful is not just about age, but about being useful in every moment.

ወጣትነት ሀብት ነው፣ እግዚአብሔር ሲፈጥረን ይሄንን ሀብት በእያንዳንዳችን ውስጥ አስቀምጧል። ይሄ ሀብት ደግሞ በአሉታዊ ነገሮች መባከን የለበትም፣ አራዳነት መስሎን በማይረባ ነገር ላይ አናውለው። እያንዳንዷን moment invest አርገን ወጣትነታችንን ለመልካም ነገር እናውለው።

መልካም ቀን!

YOUTHFUL IS USEFUL!

@python_pioneers
👍43
The Python Interpreter

Interpreter ወይም በአማርኛ ተርጓሚ ልንለው እንችላለን፣ በHigh-level programming language የፃፍነውን code ወደ machine language የሚቀይር program እንደሆነ አይተን ነበር። ሌላው ደግሞ Python interpreted language እንደሆነም ጭምር አይተናል።

የPythonን language in our devices ስንጭን ከተጫኑት ነገሮች አንዱ Python interpreter ነው። Python interpreter የPython Programming statements ማንበብ እና እነሱን execute ማድረግ የሚችል ፕሮግራም ነው። Interpreterኡን በሁለት አይነት መንገዶች መጠቀም እንችላለን፡

I.Interactive mode እና

II.Script mode

In Interactive mode, Interpreterኡ እኛ python statements keyboard ላይ እስከምንፅፍ ይጠብቃል። አንድ ጊዜ አንድ valid የሆነ statement ከፃፍን execute ያረግና waits for another statement.

In Script mode, Interpreterኡ python statements የያዘ file ውስጥ ያሉትን contents አንድ በአንድ ያነባቸዋል።
ይህ file ደግሞ python program ወይም python noscript ይባላል። Interpreterኡ each statement ባነበበ ቁጥር execute ያረጋቸዋል።

Interactive Mode

Python interpreter የሆነ operating system ውስጥ ከጫንን በኋላ ወደ command-line በመሄድ Interpreterኡን በInteractive mode ማረግ እንችላለን። with the following command:

python

When the Python interpreter starts in interactive mode, እንደዚህ አይነት ነገር displayed ይሆናል።

Python 3.11.8 (main, Feb 11 2024, 13:05:24) [Clang 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d1 on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>


ይህኛው👇 ምልክት የሚያሳየው Interpreterኡ የሆነ ነገር እንድትፅፉ እየጠበቀ መሆኑና የምትፅፉትን python statement execute ለማረግ ready እንደሆነ ነው።👇

>>>

...ይቀጥላል

@python_pioneers
@python_pioneers
👍3👏2
INTERACTIVE MODE

One of the simplest statements that you can write in Python is a print statement, print የፈለግነውን መልዕክት screen ላይ display ለማድረግ የሚጠቅም statement ነው።

ለምሳሌ፡ ከዚህ በታች ያለው statement Hello, Ethiopia! የሚል መልዕክት displayed እንዲሆን ያደርጋል።

>>>print('Hello, Ethiopia!')

Notice that ከprint statement በኋላ መልዕክታችንን የፃፍነው በquote marks ወይም በትምህርተ ጥቅስ መካከል ነው፣ qoute marks አስፈላጊ ቢሆኑም they will not be displayed, these qoutes ጅ የፆፍነውን መልዕክት መጀመሪያና መጨረሻ ያሳያሉ።

>>>print('Hello, Ethiopia!').  [ENTER]
Hello, Ethiopia!
>>>

መልዕክቱ displayed ከተደረገ በኋላ >>> prompt ተመልሶ ይመጣል፣ ሌላ statement እንድትፅፉ እየጠበቀ ነው ማለት ነው።

ስለ Python ለመማር Interactive mode preferable ነው። That means we don't need to create a file, write a code in it, save it....bla bla.... We just write statements and get quick executions.

ከPython interpreter ለመውጣት ደግሞ እነዚህን አማራጮች መጠቀም እንችላለን exit() [ENTER], CTRL + Z for windows, CTRL + D for Mac, Linux or UNIX computers.

በቀጣይ python programs በnoscript mode እንዴት እንደንደምንፅፍ እናያለን።

Stay Tuned!

@python_pioneers
@python_pioneers
👍3
SCRIPT MODE

Interactive mode የፃፍነውን code test ለማድረግ ጠቃሚ ቢሆንም በዚህ mode ምንፅፋቸው codes saved አይሆኑም። They are simply executed and their results displayed on the screen.

Python statements እንደ program save ለማድረግ፣ you save those statements in a file፣ ከዛም python Interpreter በnoscript mode በመጠቀም የፃፍነውን code execute ማድረግ እንችላለን።

For example, suppose you want to write a Python program that displays the following three lines of text:

My name is Abebe.
I am 25 years old.
I am a university student.

Programኡን ማንኛውንም አይነት text editor መፃፍ እንችላለን፣ ፅፈን ስንጨርስ ደግሞ programኡን የፃፍንበትን file with the .py extension save እናረገዋለን።

print('My name is Abebe.')
print('I am 25 years old.')
print('I am a university student.')

ለምሳሌ fileኡን በዚህ ስም save አርገናል እንበል: ethio.py

የፃፍነውን program run ለማድረግ ደግሞ ወደ operating systemኡ command-line በመሄድ fileኡ ያለበት folder ውስጥ እንደሚከተለው እንፅፋለን፡

python ethio.py

This starts the Python interpreter in noscript mode and causes it to execute the statements in the file ethio.py. When the program finishes executing, the Python interpreter exits.

And here is the output:

My name is Abebe.
I am 25 years old.
I am a university student.


...እንቀጥላለን

@python_pioneers
👍1
DATA TYPES IN PYTHON

In Python, data types የተለያዩ የመረጃ አይነቶችን categorize እንድናረግ ይረዱናል፡ such as numbers, strings, lists, tuples, and dictionaries.

እናም ስለ data types ያለን understanding for efficient data manipulation እና memory allocation አስፈላጊ ነው።

Here are some common data types in Python:

1. Integer(int):
ይሄ data type represent የሚያረገው decimal point የሌላቸውን ቁጥሮች ነው።

ለምሳሌ : 5, -10, 100

2. Floating-point(float):

ይሄ data type ደግሞ represent የሚያረገው ነጥብ(decimal point) ያላቸውን ቁጥሮች ነው።

ለምሳሌ : 3.14, -2.5, 100.0

3. String(str):

Represent የሚያረገው በquotation marks(single, double or triple) enclosed የሆኑ textኦችን ነው።

ለምሳሌ : 'Python', "Pioneers", '''Ethiopia'''

4. Boolean(bool):

Represents one of two values, True(1) or False(0).

ለምሳሌ: True, False

5. List:

Represents a collection of elements that can be of different data types. በ square bracket ነው የሚሸፈነው, being itself a data type ሌሎችንም አይነት data types በውስጡ ይይዛል።

ለምሳሌ : [1, 'pioneers', True]

6. Tuple:

ከlist ጋር ተመሳሳይ ቢሆንም it is immutable (ማለትም we can not change its contents). በ bracket ይሸፈናል።

ለምሳሌ: (1, 'name', False)

7. Dictionary:

በkey-value መንገድ የተያያዙ data types represent ያረጋል፣ one pointing the other. It is enclosed with curly brackets.

ለምሳሌ: {'name': 'Abebe', 'age': 30}

የአንድን variable(we will learn about them) data type ለማወቅ 'type()' የሚባል built-in function(It is a type of function which is already present in the interpreter as a part of the standard library) እንጠቀማለን።

ለምሳሌ:

x = 10
print(type(x)) # Output: <class 'int'>

TRY IT!

Understanding and manipulating different data types in Python is crucial for writing effective and efficient code.

It also helps in ensuring the correct interpretation and handling of data throughout a program.

ስለ እያንዳንዱ data type በቀጣይ እንማራለን

@python_pioneers
@python_pioneers
👍2
እስኪ ይህችን ታራክ አንብቧት

Three Feet From Gold:

During the gold rush, a man who had been mining in Colorado for several months quit his job, as he hadn’t struck gold yet and the work was becoming tiresome.

He sold his equipment to another man who resumed mining where it had been left off. The new miner was advised by his engineer that there was gold only three feet away from where the first miner stopped digging.

The engineer was right, which means the first miner was a mere three feet away from striking gold before he quit.

The Moral:

When things start to get hard, try to persevere through the adversity. Many people give up on following their dreams because the work becomes too difficult, tedious, or tiresome–but often, you’re closer to the finish line than you may think, and if you push just a little harder, you will succeed.

መልካም ምሽት!♥️

#English_Stories

@python_pioneers
👍6
VARIABLES IN PYTHON

በቀጣይ በPython ስለ variables ምንነት እንማራለን።

Stay Tuned!

@python_pioneers
@python_pioneers
👍3
VARIABLES IN PYTHON

In Python, Variables data values store ለማረግ ነው የሚያገለሉት። በMathematics ካየን a variable is a symbol that represents a number፡ አብዛኛውን ጊዜ ደግሞ ፊደል ነው። በተመሳሳይ፡ variable በpython ለሆነ data value መጠሪያ ነው፡ it can be a single letter or a word.

1. Variable Declaration: You declare variables in Python simply by assigning a value to them using the = sign. Variable declare ስናረግ በcomputerኡ memory ውስጥ የምንፈልገውን value store የምናረግበት space ይፈጠራል።

It is like የሆነ ሳጥን አላችሁ እንበል፣ ከዛ ስም ትሰጡታላችሁ፣ እናም የፈለጋችሁትን ነገር ሳጥኑ ውስጥ ማረግ ትችላላችሁ so think the same way about variables.

x = 5

2. Variable Naming Rules:
-የvariable ሥም ፊደል፣ ቁጥር እና underscore(_) መያዝ ይችላል።
- የvariable ሥም በቁጥር መጀመር አይቻልም።
- Variable names case-sensitive ናቸው። ማለትም ለምሳሌ age እና Age አንድ አይነት variable አይደሉም።

my_variable = "Hello"

3. Data Types: Python is dynamically typed, ማለትም የvariableኡን data type declare ማረግ አይጠበቅብንም። Python automatically የሚገባውን data በማየት የvariableኡን data type assign ያረጋል፣ ይሄ ግን ለሁሉም programming languages የሚሰራ አይደለም።

ለምሳሌ፡ difference in variable declaration between Java and Python እንይ፡

Declaring a variable in Java

int x = 5;

በዚህ ጊዜ variable declare ስናረግ data typeኡንም assign ማረግ ይኖርብናል። ግን we don't need to do this in python, since it automatically assigns the type of data at the instant we give it a value.

Declaring a variable in Python:

x = 5

Let's assign different data types to a variable in python

x = 5  # x is an integer
y = 3.14 # y is a float
z = "Hello" # z is a string

4. Variable Reassignment: You can reassign a variable to a different value. ተምሳሳይ variable በመጠቅም value reassign ማረግ እንችላለን፣ that means we can give it another value.

x = 5
x = 10 # x is now assigned the value 10
# x is no more 5

...ይቀጥላል

Practice by assigning different values for variables.

Don't forget to invite your friends

@python_pioneers
@python_pioneers
👍5🙏2
Forwarded from Luna's pathway🤗 (Luna)
#Quote of the day
3
Multiple-choice questions pertaining to variable usage in Python.

Test your knowledge about variables with the following questions