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
Here are some memes that made my day๐Ÿ˜‚

#Fun
#Memes

@python_pioneers
๐Ÿ˜3
This media is not supported in your browser
VIEW IN TELEGRAM
Here comes If๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚

#Fun

@python_pioneers
๐Ÿคฃ3
Hey everyone!

แ‰€แŒฃแ‹ญ แ‰ตแˆแˆ…แˆญแ‰ณแ‰ฝแŠ• แ‹จแˆšแˆ†แАแ‹ แˆตแˆˆ for loop แАแ‹แข

Stay tuned for some exciting exercises and examples in our upcoming session!

#ForLoop

@python_pioneers
๐Ÿ‘4
FOR LOOP

For loopแŠ• แ‰  Python แ‹จแˆแŠ•แŒ แ‰€แˆ˜แ‹ แ‹จแˆ†แАแŠ• line of code แ‹ˆแ‹ญแˆ แŠฅแŠ•แ‹ฐ list, tuple, string, range, numbers... แ‹จแˆ˜แˆณแˆฐแˆ‰ sequence of elements แ‰ แ‰ฐแ‹ฐแŒ‹แŒ‹แˆš execute แˆˆแˆ›แˆจแŒ แАแ‹แข แ‹ญแˆ… แ‹ฐแŒแˆž แ‰ sequenceแŠก แŠฅแ‹ซแŠ•แ‹ณแŠ•แ‹ฑ item แˆ‹แ‹ญ แ‰ฐแˆ˜แˆณแˆณแ‹ญ operation แŠฅแŠ•แ‹ตแŠ“แŠซแˆ„แ‹ต แ‹ญแˆจแ‹ณแŠ“แˆแข

แ‰ Python แ‹จfor loop basic syntax แ‹ญแˆ„แŠ• แ‹ญแˆ˜แˆตแˆ‹แˆ:


for item in sequence:
# do something with item

แ‰ syntaxแŠก แ‹แˆตแŒฅ:

- "item" แ‹จแˆšแˆˆแ‹ แ‰ แŠฅแ‹ซแŠ•แ‹ณแŠ•แ‹ฑ Iteration(แ‹ตแŒแŒแˆžแˆฝ) แ‹จsequenceแŠกแŠ• every item แ‹ญแ‹ˆแŠญแˆ‹แˆ(placeholder variable แАแ‹แข)

- "sequence" แ‹จแˆšแˆˆแ‹ แ‹ฐแŒแˆž แ‹จแˆšแ‹ˆแŠญแˆˆแ‹ loopแŠก iterate แ‹จแˆšแ‹ซแˆจแŒแ‰ฃแ‰ธแ‹ elements of sequenceแŠ• แАแ‹แข

แŠฅแˆตแŠช แŠจแˆ‹แ‹ญ แ‹ซแˆˆแ‹แŠ• แˆ€แˆณแ‰ฅ แ‰ แˆแˆณแˆŒ แŠฅแŠ•แ‹จแ‹แฃ แ‰ แˆแˆณแˆŒแ‹ แ‹ฐแŒแˆž แ‹จแˆ†แА แ‹จแ‰แŒฅแˆฎแ‰ฝ แˆตแ‰ฅแˆตแ‰ฅ แŠ แˆˆ แฃ แŠจแ‹›แˆ แ‰ listแŠก iterate แŠฅแ‹ซแˆจแŒˆ แŠฅแ‹ซแŠ•แ‹ณแŠ•แ‹ฑแŠ• แ‰แŒฅแˆญ print แ‹จแˆšแ‹ซแ‹ฐแˆญแŒ program แˆˆแˆ˜แƒแ แŠฅแŠ•แˆžแŠญแˆซแˆˆแŠ•แข

We will learn deeply about lists in the future...

numbers = [1, 2, 3, 4, 5]

for num in numbers:
print(num)

This would output:
1
2
3
4
5



...to be continued

#ForLoop

@python_pioneers
@python_pioneers
๐Ÿ‘4๐Ÿฅฐ1
... continued

For loopแŠ• แŠจrange() functionแˆ แŒ‹แˆญ แˆ˜แŒ แ‰€แˆ แŠฅแŠ•แ‰ฝแˆ‹แˆˆแŠ•แฃ แ‰ แ‹šแˆ… แ‹ฐแŒแˆž แ‹จแˆ†แŠ‘ range of numbers แˆ‹แ‹ญ iterate แŠฅแŠ“แˆจแŒ‹แˆˆแŠ•แข

แ‹จ range() function Python built-in function แˆฒแˆ†แŠ• sequence of numbers แŠฅแŠ•แ‹ตแŠ•แˆแŒฅแˆญ แ‹ญแˆจแ‹ณแŠ“แˆแข แŠฅแŠ“แˆ แŠจfor loop แŒ‹แˆญ แ‰ฐแŒ แ‰…แˆ˜แŠ• over the sequence of numbers iterate แˆ›แ‹ตแˆจแŒ แŠฅแŠ•แ‰ฝแˆ‹แˆˆแŠ•แข

แ‹จ range() function syntax แ‹ญแˆ„แŠ• แ‹ญแˆ˜แˆตแˆ‹แˆแก

range(start, stop, step)

- start is the starting number of the sequence (optional, default is 0)

-
stop is the ending number of the sequence (required)

-
step is the difference between each number in the sequence (optional, default is 1)

แˆแˆณแˆŒ 1: แ‰ range function แŠจ0-9 แ‰แŒฅแˆฎแ‰ฝแŠ• แˆˆแˆ›แ‹แŒฃแ‰ต แŠจแˆแˆˆแŒแŠ•แก range(9) แˆ›แˆˆแ‰ต แŠฅแŠ•แ‰ฝแˆ‹แˆˆแŠ•แข

แˆแˆณแˆŒ 2:

for kutir in range(1, 6):
print(kutir)


This would output:
1
2
3
4
5

...to be continued

@python_pioneers
@python_pioneers
@python_pioneers
๐Ÿ‘6๐Ÿ”ฅ1
"You can't go back and change the beginning, but you can start where you are and change the ending."

-C.S. Lewis

แŒธแŒธแ‰ต แ‹แˆตแŒฅ แˆ˜แŒแ‰ฃแ‰ณแ‰ฝแŠ• แŠฅแŠ“ แ‰ แŒแ‹œ แ‹ˆแ‹ฐ แŠ‹แˆ‹ แˆ„แ‹ฐแŠ• แˆแŠ“แ‹ฐแˆญแŒ‹แ‰ธแ‹ แ‹จแˆแŠ•แ‰ฝแˆ‹แ‰ธแ‹แŠ• แАแŒˆแˆฎแ‰ฝ แ‹ซแˆˆแˆ›แ‰‹แˆจแŒฅ แˆ›แˆฐแ‰ฅ แ‰€แˆ‹แˆ แАแ‹แข แАแŒˆแˆญ แŒแŠ• แ‹ซแˆˆแˆแ‹ แАแŒˆแˆญ แˆ‹แ‹ญ แˆ˜แ‰†แ‹จแ‰ณแ‰ฝแŠ• แˆแŠ•แˆ แŠ แ‹ญแŒ แ‰…แˆ˜แŠ•แˆแข แ‹ˆแ‹ฐ แŠ‹แˆ‹ แ‰ฐแˆ˜แˆแˆฐแŠ• แ‹จแˆ†แАแ‹แŠ•(แ‹จแˆฐแˆซแŠ“แ‰ธแ‹แŠ• แˆตแˆ…แ‰ฐแ‰ถแ‰ฝ) แˆ˜แˆˆแ‹ˆแŒฅ แŠ แŠ•แ‰ฝแˆแˆ แАแŒˆแˆญ แŒแŠ• แŠ แˆแŠ• แŒ€แˆแˆจแŠ• แ‰ฅแŠ•แ‰ณแˆจแˆ แˆˆแ‹แŒฅ แˆ›แˆแŒฃแ‰ต แŠฅแŠ•แ‰ฝแˆ‹แˆˆแŠ•แข

แˆ˜แˆแŠซแˆ แˆแˆฝแ‰ต!

#Quotes

@python_pioneers
@python_pioneers
๐Ÿ”ฅ4โค3๐Ÿ’ฏ1
Forwarded from ๐”‰๐–Ž๐–™๐–” ๐–’๐–†๐–“
https://t.me/tapswap_mirror_bot?start=r_5685218492
๐ŸŽ +2.5k Shares as a first-time gift
๐Ÿ‘1๐Ÿฅฐ1
PYTHON PIONEERS

Begin your coding journey with us! Join our Telegram and YouTube channels and start learning programming in Amharic today.

Start now and unlock endless possibilities with us.

Let's code together!

@python_pioneers
@python_pioneers
๐Ÿ‘4โค1๐Ÿ”ฅ1
Python Range Function
range()

Practice Problems

โญ๏ธ
1. What does the following code snippet do in Python?

for i in range(5): print(i)
Anonymous Quiz
57%
a) Prints numbers from 0 to 4
5%
b) Prints numbers from 1 to 5
23%
c) Prints numbers from 0 to 5
15%
d) Prints numbers from 1 to 4
2. What is the correct syntax for using the range function with a start, end, and step value specified?
Anonymous Quiz
46%
a) range(start, end, step)
19%
b) range(start:end:step)
32%
c) range(start, step, end)
3%
d) range(end, start, step)
3. What is the output of the following code snippet:

for i in range(2, 8, 2): print(i)
Anonymous Quiz
25%
a) 2, 3, 4, 5, 6, 7
69%
b) 2, 4, 6
6%
c) 3, 5, 7
0%
d) 2, 5
๐Ÿ‘1
4. In Python, what is the default step value for the range function if not specified?
Anonymous Quiz
61%
a) 1
6%
b) 2
24%
c) 0
9%
d) The step value must always be specified