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
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
3. Which keyword is used to skip the rest of the code inside the loop for the current iteration only?
Anonymous Quiz
4%
A) skip
43%
B) break
43%
C) continue
9%
D) pass
4. What will be the output of the following code?

   x = 5
while x > 0:
x -= 1
if x == 2:
continue
print(x)


- A) 4 3 2 1 0

- B) 4 3 1 0

- C) 5 4 3 2 1

- D) 5 4 3 1 0
You're gonna write a python program that processes numbers from 1 to 20 and follow these rules.

1. Skip (continue) numbers that are divisible by 3.

2. Stop (break) the loop if the number is greater than 15.

Print all the other numbers

You can use for loop to iterate through the numbers 1 to 20

แŠฅแˆตแ‰ฒ แˆžแŠญแˆฉแ‰ต

#Exercise

@python_pioneers
๐Ÿ‘2
Google or Googol

The name Google was created accidentally, it was originally supposed to be named โ€˜Googolโ€™. (Googol is the digit 1 followed by 100 zeroes).

The founders checked to see if that domain name was taken, but accidentally searched for โ€˜google.comโ€™ instead of โ€˜googol.comโ€™.

They liked that name even better and registered the domain name on September 15, 1997

#Facts
#Google

@python_pioneers
๐Ÿ‘2
THE ONLY WAY TO AVOID MISTAKES IS TO GAIN EXPERIENCE; THE ONLY WAY TO GAIN EXPERIENCE IS BY MAKING MISTAKES.


This quote reminds us that mistakes are an integral part of the process of learning and growth.

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

#Quotes

-> @Gr8r_Abb

๐Ÿ’ฌ Buzz Quotes

@python_pioneers
โค3๐Ÿ”ฅ1
แ‰ แ‰€แŒฃแ‹ญ =>
LISTS IN PYTHON

แ‰ แ‰€แŒฃแ‹ญ แ‰ Python List แˆแŠ• แŠฅแŠ•แ‹ฐแˆ†แАแฃ แˆˆแˆแŠ• แŠฅแŠ•แ‹ฐแˆšแ‹ซแˆตแˆแˆแŒˆแŠ•แŠ“ แŠฅแŠ•แ‹ดแ‰ต แˆ˜แŒ แ‰€แˆ แŠฅแŠ•แ‹ณแˆˆแ‰ฅแŠ• แŠฅแŠ•แˆ›แˆซแˆˆแŠ•แข

Stay tuned!

@python_pioneers
@python_pioneers
๐Ÿ‘3
Forwarded from The Coffee Talk Table
แ‰ แŒŽแ‹ แ‹žแŠ• แ‰ แŠ“แ‹ณ แŠ แ‹ฐแŒ‹ แˆˆแ‰ฐแˆแŠ“แ‰€แˆ‰แŠ“ แˆˆแ‰ฐแŒŽแ‹ฑ แ‹จแˆ…แ‰ฅแˆจแ‰ฐแˆฐแ‰ฅ แŠญแแˆŽแ‰ฝ แ‹ตแŒ‹แ แŠฅแŠ“แ‹ตแˆญแŒแฃ แ‰ แˆ…แ‹ญแ‹ˆแ‰ต แˆˆแ‰ฐแˆจแ‰แ‰ต แŠฅแŠ•แ‹ตแˆจแˆตแˆ‹แ‰ธแ‹

แ‰ แ‹žแŠ‘ แ‹จแŠ แ‹ฐแŒ‹ แŒŠแ‹œ แ‹แŒแŒแАแ‰ต แˆ›แ‰‹แ‰‹แˆšแ‹ซ :

แ‹จแŠขแ‰ตแ‹ฎแŒตแ‹ซ แŠ•แŒแ‹ต แ‰ฃแŠ•แŠญ แˆ‚แˆณแ‰ฅ แ‰แŒฅแˆญ
1000511561276

แˆ‹แ‹ญ แ‹ตแŒ‹แ แŠฅแŠ•แ‹ฒแ‹ซแ‹ฐแˆญแŒ‰ แ‰ฐแŒ แ‹ญแ‰€แ‹‹แˆแข


แŠฅแˆตแŠซแˆแŠ• 230 แˆฐแ‹Žแ‰ฝ แˆ…แ‹ญแ‹ˆแ‰ต แ‰ แ‹šแˆ… แŠ แ‹ฐแŒ‹ แŠ แˆแแˆ : :
๐Ÿ˜ข2
Introduction to Lists


แŠ แŠ•แ‹ต แ•แˆฎแŒแˆซแˆ แ‰ แˆแŠ•แŒฝแแ‰ แ‰ต แŒŠแ‹œ แ‰ฅแ‹™ แˆ˜แˆจแŒƒแ‹Žแ‰ฝแŠ• store แŠฅแŠ“แˆจแŒ‹แˆˆแŠ• แŠจแ‹šแ‹ซแˆ แŠฅแАแ‹šแ‹ซ แˆ˜แˆจแŒƒแ‹Žแ‰ฝ manage แˆˆแˆ›แ‹ตแˆจแŒ แ‹จแˆšแ‹ซแˆตแ‰ธแŒแˆฉ แ‹ญแˆ†แŠ“แˆ‰แข แŠฅแАแˆฑแŠ• แ‹ฐแŒแˆž retrieve แˆ›แˆจแŒ แฃ แˆ›แ‹แŒฃแ‰ตแฃ แˆ›แŒแŠ˜แ‰ต แŠฅแŠ“ แˆ˜แŒ แ‰€แˆ แ‰ แŒฃแˆ แŠจแ‰ฃแ‹ต แ‹ญแˆ†แŠ“แˆแข

แˆตแˆˆแ‹šแˆ… แŠฅแАแ‹šแ‹ซแŠ• แˆ˜แˆจแŒƒแ‹Žแ‰ฝ แ‰ แ‰กแ‹ตแŠ•/แ‰ แˆ˜แˆ˜แ‹ฐแ‰ฅ/ แŠจแ‹šแ‹ซแˆ แ‰ แŠ แŠ•แ‹ต variable แ‹แˆตแŒฅ store แˆ›แˆจแŒ แŠ แˆˆแ‰ฅแŠ•แข แ‰ Programming แ‹แˆตแŒฅ, แ‹ญแˆ… แˆ‚แ‹ฐแ‰ต แŠฅแŠ•แ‹ฐ Data structure แ‹ญแ‰ฃแˆ‹แˆแข

Data Structure is a particular way of organizing data in a computer so that it can be used effectively.


แ‹จ List แ‰ฃแˆ…แˆชแ‹ซแ‰ต

1. Lists แ‰ฐแˆ˜แˆณแˆณแ‹ญ แ‹ˆแ‹ญแˆ แ‹จแ‰ฐแˆˆแ‹ซแ‹จ (heterogeneous) data types store แˆ›แ‹ตแˆจแŒ แ‹ญแ‰ฝแˆ‹แˆ‰

2. Lists dynamic แŠ“แ‰ธแ‹ แˆ›แˆˆแ‰ตแˆ we don't need to mention the size of the list while declaring.

3. Order is preserved, แ‹ˆแ‹ญแˆ insert แ‹ซแˆจแŒแАแ‹แŠ• data as long as there are no modifications to the list แ‰ แ‰ฐแˆ˜แˆณแˆณแ‹ญ order แАแ‹ outputแŠกแŠ•แˆ แ‹จแˆแŠ“แŒˆแŠ˜แ‹แข

4. Lists duplicate แ‹จแˆ†แА element แˆ˜แ‹ซแ‹ แ‹ญแ‰ฝแˆ‹แˆ‰

5. In lists แ‹‹แŠ“แ‹แŠ• แˆšแŠ“ แ‹จแˆšแŒซแ‹ˆแ‰ฐแ‹ index แАแ‹แฃ Index แ‰ แˆ˜แŒ แ‰€แˆ แАแ‹ แ‹จlistแŠกแŠ• elements access แ‹จแˆแŠ“แˆจแŒˆแ‹ (แˆตแˆˆ index แ‰ แ‰€แŒฃแ‹ญ แŠฅแŠ“แ‹ซแˆˆแŠ•)

6. List objects mutable แŠ“แ‰ธแ‹ แˆ›แˆˆแ‰ตแˆ listแŠก แŠจแ‰ฐแˆแŒ แˆจ แ‰ แŠ‹แˆ‹ แ‹จlistแŠกแŠ• content modify แˆ›แˆจแŒ แ‹ˆแ‹ญแˆ แˆ˜แ‰€แ‹จแˆญ แŠฅแŠ•แ‰ฝแˆ‹แˆˆแŠ•แข

...to be contd

#Lists

@python_pioneers
@python_pioneers
๐Ÿ‘2
...contd

How to create a List?


List create แˆˆแˆ›แˆจแŒ แ‰ฅแ‹™ แŠ แ‹ญแАแ‰ต แˆ˜แŠ•แŒˆแ‹ถแ‰ฝ แŠ แˆ‰แฃ แŠฅแˆตแŠช แ‰ แˆแˆณแˆŒ แŠฅแŠ•แˆ˜แˆแŠจแ‰ณแ‰ธแ‹:

1. Using square brackets

แ‰ python list square brackets แ‰ แˆ˜แŒ แ‰€แˆ แˆ˜แแŒ แˆญ แŠฅแŠ•แ‰ฝแˆ‹แˆˆแŠ•แฃ แ‹จlistแŠกแŠ• elements แ‹ฐแŒแˆž แ‰ comma แŠฅแŠ•แˆˆแ‹ซแ‹ซแ‰ธแ‹‹แˆˆแŠ•แข
Syntax
:
list_name = [elements]

แˆˆแˆแˆณแˆŒ:
my_list = [1, 2, 3, 4, 5]


2. Using list() function

แˆแˆˆแ‰ฐแŠ›แ‹ list แˆ˜แแŒ แˆชแ‹ซ แˆ˜แŠ•แŒˆแ‹ต แ‹ฐแŒแˆž list() แ‹จแˆšแ‰ฃแˆ built-in function แ‰ แˆ˜แŒ แ‰€แˆ แАแ‹แข แ‹ญแˆ„แŠ• แ‹ฐแŒแˆž แ‹จแˆแŠ•แŒ แ‰€แˆ˜แ‹ แŠจแ‰ฐแˆˆแ‹ซแ‹ฉ data types like : strings, set, tuple ...etc list แˆ˜แแŒ แˆญ แˆตแŠ•แˆแˆแŒ แАแ‹แข

Set, tuple, Dictionary -> แ‰ แ‰€แŒฃแ‹ญ แŠฅแŠ•แˆ›แˆซแ‰ธแ‹‹แˆˆแŠ•

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

name = "ABEBE"

my_list = list(name)

print(my_list) # Output : ['A', 'B', 'E', 'B', 'E']


3. Using list() and range() function

แ‹จrange() function sequence of numbers create แ‹ซแˆจแŒ‹แˆแฃ starting from 0 by default, and increments by 1 (by default), แŠฅแŠ“ specified แŠจแˆ†แАแ‹ แ‰แŒฅแˆญ แ‰ แŠแ‰ต แ‹ญแ‰†แˆ›แˆแข

...to be contd

#Lists

@python_pioneers
@python_pioneers
๐Ÿ‘5๐Ÿ™1
โ€‹โ€‹Good evening world! ๐ŸŒŽ
โค2๐Ÿ‘1
Test your knowledge about basics of lists in python with these๐Ÿ‘‡ questions
2. How do you create an empty list in Python?
Anonymous Quiz
22%
A) my_list = ()
10%
B) my_list = {}
68%
C) my_list = []
0%
D) my_list = None
Python Pioneers: A Beginner's Guide ๐Ÿ‡ช๐Ÿ‡น
GIF
Good morning everyone! ๐ŸŒž๐ŸŒ„
โค2