Skip to main content

Posts

Python Day 8 – Lists

  ๐Ÿง  Introduction ๐Ÿ Python Day 8 – Lists Ippati varaku manam functions nerchukunnam. Eroju manam Lists gurinchi nerchukundam. ๐Ÿ‘‰ List ante multiple values ni okesari store cheyadaniki use avutundi ๐Ÿ’ก Example: Shopping items list laga ๐Ÿ“ฆ ๐Ÿ”น Create List numbers = [ 1 , 2 , 3 , 4 , 5 ] names = [ "Manju" , "Ravi" , "Kiran" ] ๐Ÿ”น Access List (Index) print ( numbers [ 0 ]) # 1 print ( names [ 1 ]) # Ravi ๐Ÿ‘‰ Index always 0 nundi start avutundi ⚠️ ๐Ÿ”น Add Elements numbers . append( 6 ) print ( numbers ) ๐Ÿ”น Remove Elements numbers . remove( 3 ) print ( numbers ) ๐Ÿ”น Loop Through List for i in numbers : print ( i ) ๐Ÿ”น List Length print ( len ( numbers )) ๐Ÿ”น Slicing print ( numbers [ 1 : 4 ]) ๐Ÿงช Real Example marks = [ 80 , 90 , 75 , 60 ] for m in marks : if m >= 75 : print ( "Pass:" , m ) ๐ŸŽฏ Mini Practice names = [ "A" , "B" , "C" ] names . append( "D...
Recent posts

Python Day 7 – Functions

  ๐Ÿง  Introduction ๐Ÿ Python Day 7 – Functions Ippati varaku manam loops nerchukunnam. Eroju manam Functions gurinchi nerchukundam. ๐Ÿ‘‰ Function ante reusable block of code ๐Ÿ‘‰ Same code malli malli rayakunda use cheyachu ๐Ÿ’ก Real-time lo time save + clean code ๐Ÿ”ฅ ๐Ÿ”น Function Create Cheyadam def greet ():      print ( "Hello, Welcome!" ) ๐Ÿ‘‰ Function call cheyali: greet () ๐Ÿ”น Function with Parameters def greet ( name ): print ( "Hello" , name ) greet ( "Manju" ) ๐Ÿ”น Function with Return def add ( a , b ):      return a + b result = add ( 10 , 5 ) print ( result ) ๐Ÿงช Real Example def check_even ( num ):      if num % 2 == 0 :           return "Even"      else :           return "Odd" print ( check_even ( 4 )) ⚠️ Important Points ๐Ÿ‘‰ def keyword use chestam ๐Ÿ‘‰ Function call cheyyakapothe run avadu ๐Ÿ‘‰ return ...

Python Day 6 – Loops (for & while)

  ๐Ÿ Python Day 6 – Loops (for & while) ๐Ÿง  Introduction ๐Ÿ Python Day 6 – Loops (for & while) Manam If-Else tho decisions tiskunnam. Eroju manam loops nerchukundam. ๐Ÿ‘‰ Loop ante same code ni malli malli run cheyadam ๐Ÿ‘‰ Time save avutundi + automation easy ๐Ÿ’ก Example: 1 nundi 10 varaku print cheyadam ๐Ÿ” for Loop for i in range ( 1 , 6 ): print ( i ) ๐Ÿ‘‰ Output: 1 2 3 4 5 ๐Ÿ” while Loop i = 1 while i <= 5 : print ( i ) i += 1 ๐Ÿงช Example – Table Print num = int ( input ( "Enter number: " )) for i in range ( 1 , 11 ): print ( num , "x" , i , "=" , num * i ) ⚠️ Infinite Loop (Careful!) while True : print ( "Hello" ) ๐Ÿ‘‰ Stop cheyyali ante: Ctrl + C ๐ŸŽฏ Mini Practice for i in range ( 1 , 11 ): if i % 2 == 0 : print ( i ) ๐Ÿ‘‰ Even numbers print avutayi ๐Ÿ“Œ Summary ✔ for loop nerchukunnam ✔ while loop use chesam ✔ practical examples chusam

Python Day 5 – If Else Conditions

  ๐Ÿ Python Day 5 – If Else Conditions ๐Ÿง  Introduction ๐Ÿ Python Day 5 – If Else Conditions Ippati varaku manam operators nerchukunnam. I roju manam decision making (If-Else) nerchukundam. ๐Ÿ‘‰ Program lo condition base chesi decisions tiskovadaniki use avutundi ๐Ÿ’ก Example: Age 18 kanna ekkuva unte → eligible Lekapothe → not eligible ๐Ÿ”น Basic If Condition age = 20 if age > 18 : print ( "Eligible" ) ๐Ÿ”น If-Else Condition age = 16 if age >= 18 : print ( "Eligible" ) else : print ( "Not Eligible" ) ๐Ÿ”น If-Elif-Else marks = 75 if marks >= 90 : print ( "Grade A" ) elif marks >= 60 : print ( "Grade B" ) else : print ( "Grade C" ) ๐Ÿงช Real Example (User Input) age = int ( input ( "Enter your age: " )) if age >= 18 : print ( "You can vote ✅" ) else : print ( "You cannot vote ❌" ) ⚠️ Important Points ๐Ÿ‘‰ Indentation (space) very import...

Python Day 4 – Operators

  ๐Ÿ Python Day 4 – Operators ๐Ÿง  Introduction ๐Ÿ Python Day 4 – Operators Ippati varaku manam input & output nerchukunnam. I roju manam Operators gurinchi nerchukundam. ๐Ÿ‘‰ Operators ante values mida operations cheyadaniki use avuthayi Example: +, -, *, / ๐Ÿ’ก Maths lo use chese symbols laga ne untayi ➕ Arithmetic Operators <> Python a = 10 b = 5 print(a + b) print(a - b) print(a * b) print(a / b) # 15 # 5 # 50 # 2.0 ๐Ÿ”ข More Operators print ( a % b ) # Modulus (remainder) print ( a ** b ) # Power print ( a // b ) # Floor division ๐Ÿงช Example Program a = int ( input ( "Enter first number: " )) b = int ( input ( "Enter second number: " )) print ( "Addition:" , a + b ) print ( "Subtraction:" , a - b ) print ( "Multiplication:" , a * b ) print ( "Division:" , a / b ) ๐Ÿ“Œ Comparison Operators a = 10 b = 5 print ( a > b ) # True print ( a < b ) # False print ( a == b ) # Fals...