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
This media is not supported in your browser
VIEW IN TELEGRAM
PYTHON ON UBUNTU

Read the post above๐Ÿ‘† to have more insight about the installation process.

@python_pioneers
@python_pioneers
โค1
PYTHON ON WINDOWS

แ‹จWindows แ‰ฐแŒ แ‰ƒแˆšแ‹Žแ‰ฝ แ‹จแˆšแŠจแ‰ฐแˆ‰แ‰ตแŠ• steps แ‰ แˆ˜แŠจแ‰ฐแˆ pythonแŠ• install แˆ›แ‹ตแˆจแŒ แ‰ตแ‰ฝแˆ‹แˆ‹แ‰ฝแˆแข

1. Download Python: Go to the official Python website (python.org) and download the latest version of Python for Windows.

2. Run the Installer: Once the download is complete, locate the downloaded file and double-click to run the installer.

3. Install Python: Click on the "Install Now" button to begin the installation process. The installer will copy files and configure Python on your system.

4. Verify Installation: Once the installation is complete, open the command prompt and type python --version to verify that Python has been installed correctly.

You should see the version number of Python that you installed.

That's it! Python is now installed on your Windows system, and you can start writing and running Python code.

Installation แˆ‚แ‹ฐแ‰ฑแŠ• แ‹จแˆšแ‹ซแˆณแ‹ญ vedio link แŠจแˆตแˆญ แŠฅแŠ•แˆˆแ‰…แˆ‹แ‰ฝแŠ‹แˆˆแŠ•

If you face any problems, let us know.โšก

#Windows
#Python

@python_pioneers
๐Ÿ‘4
What is the recommended method to install Python on Windows?
Anonymous Quiz
2%
B) Using the Microsoft Store
4%
C) Installing via Chocolatey
2%
D) Compiling from source
Which version of Python is recommended for most users to install?
Anonymous Quiz
7%
A) Python 2
53%
B) Python 3
33%
C) Python 3.6
7%
D) Python 4
What command is commonly used to check the Python version installed on your system?
Anonymous Quiz
21%
A) python -v
15%
B) python version
6%
C) version python
58%
D) python --version
How do you start the Python interpreter on the terminal?
Anonymous Quiz
14%
A) python start
27%
B) run python
48%
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
๐Ÿ‘4โค3
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 script แ‹ญแ‰ฃแˆ‹แˆแข 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 แ‰ script 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 แ‰ script 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 script 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