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
Let's have some fun😊
🤣4
What are Tuples?

Tuple በpython የobjects ስብስብ ሲሆን ባለፈው እንደተማርነው we can't change the order of the items in it.


Objectኦቹ strings, lists, tuples, integers etc. ሊሆኑ ይችላሉ።

የTuple insertion characteristics preserved ነው፣ once elements ካስቀመጥን we can't modify them.

Elements ከtuple የምናገኘው መጀመሪያ ባስቀመጥንበት order ነው።

Immutable: Once if we create a tuple object, then we cannot modify the content of the tuple object.

ከlist የሚለያቸው ነገር ቢኖር ይህ ነው ፡ immutable መሆናቸው።


Tuple duplicate data store ማረግ ይችላል unlike set.

Tuple ተመሳሳይም ሆነ የተለያየ data type store ያረጋሉ እንደ list ማለት ነው

to be cont'd...

#Tuple

@python_pioneers
👍4
Difference between Tuple and List

@python_pioneers
👍3
ደህና ዋላችሁ ቤተሰቦች!

ዛሬ ችግኝ ተከላችሁ ወይ?
Anonymous Poll
14%
አዎ
86%
አይ
Tuple የምንፈጥርባቸው ብዙ መንገዶች አሉ ፣ like

1. By using tuple() function
2. By manually inserting the elements inside a parenthesis

ለምሳሌ :
my_tuple = ("Monday", "Tuesday" "Wednesday")

ወይም range function inside tuple function በመጠቀም a tuple of numbers መፍጠር እንችላለን።

የTuple ጥቅሞች ውስጥ packing እና unpacking ትልቁን ድርሻ ይወስዳሉ።

Packing

We can create a tuple by packing a group of variables.

Syntax :
tuple_name = elements

ለምሳሌ :
a, b, c, d = 10, 20, 30, 40
my_tuple = a, b, c, d
print(my_tuple)

#Output: (10, 20, 30, 40)

Unpacking

Tuple unpacking is the reverse process of tuple packing, we can unpack a tuple and assign its values to different variables.

Syntax :
elements = tuple_name

ለምሳሌ :
my_tuple = (10, 20, 30, 40)
a, b, c, d = my_tuple

print(" a =", a, " b =", b, " c =", c, " d =", d)

#Output : a = 10 b = 20 c = 30 d = 40

Tuple unpacking በመጠቀም multiple variables በአንድ ጊዜ declare ማድረግ እንችላለን።


#Tuple

@python_pioneers
Tomorrow, we will be building a simple Python number guessing game to ensure you gain deep and applicable knowledge from what you're learning.

#NumberGuessingGame

@python_pioneers
Media is too big
VIEW IN TELEGRAM
ትላንት ባልነው መሠረት here is our simple number guessing game python code.

ስለ codeኡ አሰራር ከስር እንጽፋለን...

#Game
#GuessGame

@python_pioneers
👍1
Number guessing game በPython ይሄን ይመስላል፣ እያንዳንዱን የcodeኡን section እስቲ እንይ፣

1. Importing the random module:


   import random

- `random moduleን import ያረግነው set ባረግነው range ገደብ random ቁጥር እንዲሰጠን ነው።

2. User Input for the Range:

   min = int(input("Minimum number for your guess range: "))
max = int(input("Maximum number for your guess range: "))

Gameኡን የሚጫወቱው ሰው ለguessing range minimum እና maximum value እንዲመርጥ እንጠይቀዋለን። ከዛ የተቀበልነውን string data type int() function በመጠቀም ወደ integerነት እንቀይረዋለን።


3. Generating a Random Number:

   rand_num = random.randint(min, max)

በዚህ section ደግሞ random number generate እንዲያረግልን import ያረግነውን module ተጠቅመናል:
Using random.randint()

4. Initializing the Guess Counter:

   no_of_guesses = 0

እዚህ ደግሞ userኡ ምን ያህል ጊዘ እንደገመተ የምንቆጣጠርበትን variable declare አርገናል፣ initial value ደግሞ zero ሰጥተንዋል።

#GuessGame

@python_pioneers
while True:
user_guess = int(input("Make a guess: "))
if user_guess == rand_num:
print("Congrats, you got the number!")
break
elif user_guess > max or user_guess < min:
print("Your guess is out of range!")
break
elif user_guess > rand_num:
print("You are above the number, make a lower guess.")
elif user_guess < rand_num:
print("You are below the number, make a higher guess.")
else:
print("Wrong Input!")
break
no_of_guesses += 1

- The program enters an infinite loop using while True: where the user is repeatedly prompted to guess the number.

- Checking if the Guess is Correct:
Userኡ ያስገባው ቁጥር ከ random numberኡ ጋር እኩል ከሆነ "Congrats, ..." የሚለው message printed ይሆናል።

- Checking for Out-of-Range Guesses:
Userኡ ያስገባው ቁጥር specified ከሆነው range ውጪ ከሆነ loopኡ ይቆማል።


- Providing Hints:

- If the guess is higher than the random number, the user is informed and asked to guess a lower number.

- If the guess is lower than the random number, the user is informed and asked to guess a higher number.



- Incrementing the Guess Counter:

After each guess, the no_of_guesses counter is incremented by 1 to track the number of attempts.

#GuessGame

@python_pioneers
👍31🙏1
This media is not supported in your browser
VIEW IN TELEGRAM
😁😁😁😁😁😁😁😁😁😁
😁5👍1
The Weight of the Glass

Once upon a time a psychology professor walked around on a stage while teaching stress management principles to an auditorium filled with students. As she raised a glass of water, everyone expected they’d be asked the typical “glass half empty or glass half full” question. Instead, with a smile on her face, the professor asked, “How heavy is this glass of water I’m holding?”

Students shouted out answers ranging from eight ounces to a couple pounds.

She replied, “From my perspective, the absolute weight of this glass doesn’t matter. It all depends on how long I hold it. If I hold it for a minute or two, it’s fairly light. If I hold it for an hour straight, its weight might make my arm ache a little. If I hold it for a day straight, my arm will likely cramp up and feel completely numb and paralyzed, forcing me to drop the glass to the floor. In each case, the weight of the glass doesn’t change, but the longer I hold it, the heavier it feels to me.”

As the class shook their heads in agreement, she continued, “Your stresses and worries in life are very much like this glass of water. Think about them for a while and nothing happens. Think about them a bit longer and you begin to ache a little. Think about them all day long, and you will feel completely numb and paralyzed – incapable of doing anything else until you drop them.

The moral: It’s important to remember to let go of your stresses and worries. No matter what happens during the day, as early in the evening as you can, put all your burdens down. Don’t carry them through the night and into the next day with you. If you still feel the weight of yesterday’s stress, it’s a strong sign that it’s time to put the glass down



#EnglishStory

@python_pioneers
6🔥2
የቴሌግራም መስራች እና ዋናው ስራ አስኪያጅ ፓቨል ዱሮቭ ፍርድ ቤት ቀርቧል።

ፍርድ ቤት በ5 ሚሊዮን ዩሮ ወይም 5.56 ሚሊዮን ዶላር ዋስ ተለቆ ጉዳዩን እንዲከታተል ወስኖለታል።

ከፈረንሳይ እንዳይወጣ ግን ታግዷል።

እገዳው ተጨማሪ ምርመራ ስለሚደረግ ነው የተጣለው።

በሳምንት ሁለት ጊዜ ለፖሊስ ሪፖርት ማድረግ እንዳለበት ተገልጿል።

ዱሮቭ ከቀናት በፊት ፓሪስ አቅራቢያ ኤርፖት ተይዞ ከታሰረ በኃላ በፖሊስ ቁጥጥር ስር ቆይቶ ነበር። ከዚህ በላይ በህጉ ማቆየት ስለማይቻል ከማቆያ ወጥቶ በፍርድ ቤት ጉዳዩ ታይቷል።

ፍርድ ቤቱም ከፈረንሳይ እንዳይወጣ በማገድ የ5 ሚሊዮን ዩሮ ዋስትና ፈቅዶለታል።

የፈረንሳይ መንግስት ዱሮቭ ላይ ምርመራ የከፈተው በቴሌግራም ፦
- ሞደሬት የማድረግ / ቁጥጥር የማድረግ ክፍተት አለ፣
- ለባለስልጣናት አስፈላጊ መረጃ አይሰጥም
- የወንጀል ድርጊቶች ይፈጸምበታል፣
- የአደገኛ እፅ ዝውውር ይከናወንበታል
- ሽብር፣ መኒ ላውንደሪንግ ይሰራበታል በሚል ነው።

ቴሌግራም ወደ 1 ቢሊዮን ተጠቃሚዎች ያሉት ሲሆን በነጻነቱና ደህንነቱ በተጠበቀ የመልዕክት እና መረጃ ልውውጥ በብዙዎች ዘንድ እጅግ ተመራጭ ነው።

#TikvahEthiopia

@tikvahethiopia
This media is not supported in your browser
VIEW IN TELEGRAM
😁😁😁😁😁😁😁😁😁😁😁
😁3🤣3👍1
Built-in data types in python

@python_pioneers
1👍1
Forwarded from Tikvah-University
በ2016 ዓ.ም አራት የመንግሥት ዩኒቨርሲቲዎች 16 ፕሮግራሞቻቸውን ዓለም አቀፍ ዕውቅና እንዲያገኙ አስደርገዋል፡፡

አዲስ አበባ ሳይንስና ቴክኖሎጂ ዩኒቨርሲቲ ዘጠኝ፣ ባሕር ዳር ዩኒቨርሲቲ አራት፣ አዲስ አበባ ዩኒቨርሲቲ ሁለት እንዲሁም ሐረማያ ዩኒቨርሲቲ አንድ በድምሩ 16 ፕሮግራሞች ዓለም አቀፍ ዕውቅና ማግኘታቸውን ተሰምቷል፡፡

ይህ ዕውቅና አለም አቀፍ ተቀባይነት ያለው ተማሪ ለማፍራት እንደሚያግዝ በትምህርት ሚኒስቴር የከፍተኛ ትምህርት ልማት ዘርፍ አስተዳደርና መሰረተ ልማት መሪ ስራ አስፈጻሚ ሰለሞን አብርሃ (ዶ/ር) ዛሬ በአዲስ አበባ በተጀመረው ሀገር አቀፍ የትምህርት ጉባኤ ላይ ተናግረዋል፡፡

@tikvahuniversity