<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Poornima Ravi</title>
    <description>The latest articles on DEV Community by Poornima Ravi (@poornima_ravi).</description>
    <link>https://dev.to/poornima_ravi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2599301%2Fb2441eb5-df14-4026-ab0b-8f0087f05b0e.jpg</url>
      <title>DEV Community: Poornima Ravi</title>
      <link>https://dev.to/poornima_ravi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/poornima_ravi"/>
    <language>en</language>
    <item>
      <title>Python Function Type Arguments</title>
      <dc:creator>Poornima Ravi</dc:creator>
      <pubDate>Tue, 28 Jan 2025 17:33:04 +0000</pubDate>
      <link>https://dev.to/poornima_ravi/python-function-type-arguments-of7</link>
      <guid>https://dev.to/poornima_ravi/python-function-type-arguments-of7</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;""" Function Type Arguments"""
"""1. Positional Arguments

    - Values get assigned based on order/position of arguments passed""" 

def add(no1, no2, a, b):
    print(a,b,(no1+no2))
add(4,6,'Good','Morning')
add('Good','Morning',4,6)
print()


"""2. Keyword Arguments

    - Values are assigned by specifying the Fn. Argument's Keyword during the function call.
    - Positional Argument is followed by Keyword argument}"""

def kwargs(Str1, no1, List):
    print(Str1, no1)
    print(Str1, no1, List)
    print(List)
kwargs('Menu','e',[3,4,2,5])
kwargs(4,List = ['Apple', 'Mango', 'Melon'], no1 = 3)
print()

"""3. Default Arguments

    - Assigning a default value to the function parameter makes it a default argument for the function
    - if a postional/keyword arg value is passed to a default arg, the default gets overwritted with the value
    - Note : if the fn. has a default argument , it should be defined after all the positional arguments"""

def default_arg (user, job, salary = 10000):
    print(user, job, salary)
default_arg('Ken','Tech Engineer')
default_arg('Kenny','Field Engineer',5000)
default_arg('Ken_Z',45000)
default_arg('Ken_B','Tech Engineer',salary =9000)
print()

"""4. Variable Length Arguments

    - Can accept any number of positional arguments(*args)/Keyword Arguments(**args) passed to the function.
    - Positional Variable length Argument forms a tuple of all passed inputs defined under one variable
    - Keyword variable length Argument forms a Dictionary of all passed inputs defined under one variable"""

"""Positional Variable length arguments"""
def variable_length(def_argument= 'Test',*args, def_argument1='Yes'):
    print(type(args))
    print(args)
    print(args, def_argument,def_argument1)
    print(def_argument,args,def_argument1)


variable_length('My','Name','is','Henry','Ford','1995', True, 4.5)
print()
"""Keyword Variable length arguments"""

def keyword_variable_args(*args,**kw_args):
    print(type(args),type(kw_args))
    print(args)
    print(kw_args)

keyword_variable_args(4,3,'Time',True,Name='Bharat',Age = 30, Salary= 5000, Employer='TCS')
print()

"""5. Mixed Arguments

- A Function Arguments can have mix of all the argument types discussed above.
- In that case, Positional Arguments comes first , followed by keyword args, Default Arg / Keyword Variable length Arguments"""


def mixed_args(Num, *args,Str, Time = 'Fan', **Kargs):
    print(Num, Str, Time, args,Kargs)

mixed_args(4,5,4,5,3,7,'Key',5.6,Str='test',Name = 'Peacock')


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>fuctiontypearguments</category>
      <category>python</category>
      <category>pythonlearning</category>
    </item>
    <item>
      <title>Dictionary Tutorial</title>
      <dc:creator>Poornima Ravi</dc:creator>
      <pubDate>Thu, 23 Jan 2025 19:38:28 +0000</pubDate>
      <link>https://dev.to/poornima_ravi/dictionary-tutorial-54b4</link>
      <guid>https://dev.to/poornima_ravi/dictionary-tutorial-54b4</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Task 1
players = {'virat':190, 'rohit':87, 'dhoni':95, 'bumrah':100, 'sachin':78, 'Rahul':160}
#Total Score
total_score = 0
for k, v in players.items():
    total_score = total_score + v
print(total_score)
print()

#Task 2
#Highest Scorer
highest = 0 
for k, v in players.items():
    if v &amp;gt; highest:
        highest = v
        high_k = k
print(high_k,highest)
print()


#Task 3: 
#Frequency of each letter in a given word: 
name = "delllaptop"
d = {}
for letter in name:
    d[letter] = d.get(letter,0) + 1
print(d)
print()

#Task 4 :
#Frequency of each word in a given sentence
#str = 'a rose is a rose is a rose'
str = 'Cat is a pet , Cat is on the table and Cat is sleeping'
i = 0 
previous_space = 0
dict = {}
while i &amp;lt; len(str):
    if str[i] == ' ':
        dict[str[previous_space:i]] = dict.get(str[previous_space:i],0)+1
        previous_space = i+1 
    i+=1
else:
    dict[str[previous_space:len(str)]] = dict.get(str[previous_space:len(str)],0)+1
print(dict)
print()


#Task 5 :
#Sort based on values: 
players = {'virat':190, 'rohit':87, 'dhoni':95, 'bumrah': 80, 'hardik':66, 'pant':34, 'sachin':98}
sorted_dict ={}
lowest = list(players.values())[0]
lowest_key = list(players.keys())[0]
i=0
length = int(len(players))
while i&amp;lt;length:
    for k, v in players.items():
        if v &amp;lt; lowest:
            lowest = v
            lowest_key = k
    sorted_dict[lowest_key] = lowest
    players = {k:v for k, v in players.items() if k!= lowest_key}
    if players != {}:
        lowest = list(players.values())[0]
        lowest_key = list(players.keys())[0]
    i+=1
print(sorted_dict)










&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>payilagam</category>
      <category>dictionarytutorial</category>
    </item>
    <item>
      <title>Python List Tutorial Day2</title>
      <dc:creator>Poornima Ravi</dc:creator>
      <pubDate>Fri, 10 Jan 2025 19:21:10 +0000</pubDate>
      <link>https://dev.to/poornima_ravi/python-list-tutorial-day2-3751</link>
      <guid>https://dev.to/poornima_ravi/python-list-tutorial-day2-3751</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Transpose of Matrix&lt;/li&gt;
&lt;li&gt;String Rotation&lt;/li&gt;
&lt;li&gt;Matrix - sum of all rows, sum of all cols, max number in each row, min in each row&lt;/li&gt;
&lt;li&gt;Matrix - sum of cols.,sum of leading diagonal
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#1. Transpose of Matrix
l = [[10,12],
     [40,2],
     [60,3]]

Transpose = []
i = 0 
j = 0
#print(len(l[i]))
#print(len(l[j]))
while i &amp;lt; len(l[0]):
    list = []
    while j &amp;lt; len(l):
        list.append(l[j][i])
        j+=1
    Transpose.append(list)
    j=0    
    i+=1
print (l ,'Transpose:',Transpose, sep='\n')

#2. String Rotation

word = 'abcdef'
#num = 2 # --&amp;gt; cdefab
#num = 1 # --&amp;gt; bcdefa
#num = -2 # efabcd
#num = -1 # fabcde
num = int(input('Enter the Num:'))
num = num%len(word)
print(word[num:] + word[:num])

#3.Matrix -#List wise Total #List wise Maximum Value, #list wise minimum value

#List wise Total

student_marks = [[10,20,30],
                 [40,50,60],
                 [70,80,90]]

for marks_list in student_marks:
    sum = 0
    for mark in marks_list:
        sum = sum + mark
    print(sum, end=' ')
    print()

print("==============================================")


#List wise Maximum Value

student_marks = [[10,20,30],
                 [40,50,60],
                 [70,80,90]]

for marks_list in student_marks:
    max = 0
    for mark in marks_list:
        if mark &amp;gt; max:
            max = mark
    print('Max:',max, end=' ')
    print()

print("=============================================")

#list wise minimum value 


for marks_list in student_marks:
    min = marks_list[0]
    for mark in marks_list:
        if mark &amp;lt; min:
            min = mark
    print('Min:',min, end=' ')
    print()

 #4. Matrix - sum of cols,sum of leading diagonal
student_marks = [[10,20,30],
                 [40,50,60],
                 [70,80,90]]
#Sum of all columns 
#10+40+70
#20+50+80
#30+60+90
i = 0
j = 0
sum = 0
while j &amp;lt; len(student_marks):
    sum =0
    i=0
    while i &amp;lt; 3:
        sum = sum + student_marks[i][j]
        i+=1
    j+=1
    print('sum:',sum)


print('=======================================================')

#10+50+90
j = 0
sum = 0
while j &amp;lt; len(student_marks):
    sum = sum + student_marks[j][j]
    print(student_marks[j][j], end =' ')
    j+=1
print('sum:',sum)


print('=======================================================')
#30+50+70
i = 2
j = 0
sum = 0
while j &amp;lt; len(student_marks):
    sum = sum + student_marks[j][i]
    print(student_marks[j][i], end =' ')
    i-=1
    j+=1
print('sum:',sum)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>lists</category>
      <category>python</category>
      <category>payilagam</category>
    </item>
    <item>
      <title>Python List Tutorial</title>
      <dc:creator>Poornima Ravi</dc:creator>
      <pubDate>Mon, 06 Jan 2025 17:19:16 +0000</pubDate>
      <link>https://dev.to/poornima_ravi/python-list-tutorial-iao</link>
      <guid>https://dev.to/poornima_ravi/python-list-tutorial-iao</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Problem 1: Print the following Output from the 2 given lists.
#10 5 10 7
#20 5 20 10 20 30
#30 5 30 10 
l1 = [10,20,30]
l2 = [5,10,30]
for value in l1:
    for elem in l2:
        if value != elem:
            print(value, elem, end=' ')
    print()


#Problem 2 : Missing Values

print('===================================================')
l1 = [10,20,30,40,50,70,80,100,120,130,170]
d = l1[1] - l1[0]
i=0
while i&amp;lt;(len(l1)-1):
    if (l1[i+1] - l1[i]) != d :
        print('Missing Value:',l1[i]+d)
    i+=1        


#Problem 3 : l1 = [5,0,10,3,2,7,6,5,4,9,1]
#Find pair of elements with a given sum =10
print('===================================================')
l1 = [5,0,10,3,2,7,6,5,4,9,1]
i=0
j=0
while i &amp;lt;  len(l1):
    while j &amp;lt; len(l1):
        if l1[i]+l1[j] == 10 and j != i:
            print('#Element:',i,'-',l1[i],'#Index[',j,']',l1[j])
        j+=1
    i+=1
    j=0







&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>list</category>
      <category>payilagam</category>
    </item>
    <item>
      <title>String Functions Examples</title>
      <dc:creator>Poornima Ravi</dc:creator>
      <pubDate>Mon, 06 Jan 2025 13:36:07 +0000</pubDate>
      <link>https://dev.to/poornima_ravi/string-functions-examples-23g1</link>
      <guid>https://dev.to/poornima_ravi/string-functions-examples-23g1</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#1. L Strip
#2. R Strip
#3. Replace a string in a statement with another string

# L Strip
Str = input("Enter the String:")

ord_space = ord(' ')
ord_tab = ord('\t')

i = 0 
right = 0
while i &amp;lt; len(Str):
    if ord(Str[i]) != ord_space and ord(Str[i]) != ord_tab:
        right = i
        break
    i+=1
Str = Str[right:]
print('LStrip String:',Str,end='#',sep='')


# R Strip

Str = input("Enter the String:")

ord_space = ord(' ')
ord_tab = ord('\t')

i = len(Str)-1
right = 0 

while i &amp;gt; 0:
    if ord(Str[i]) != ord_space and ord(Str[i]) != ord_tab:
        right = i
        break
    else:
        i-=1

Str = Str[:right+1]

print("#", Str, "#", sep='')


# Replace a string

#MSD --&amp;gt; Dhoni
#MSD is Former Indian Captain.  MSD is retired. MSD plays for CSK
sen = 'MSD is Former Indian Captain.  MSD is retired. MSD plays for CSK - MSD'
Key = 'MSD'
New_sen = ''
Key_Len = len(Key)
i=0
while i&amp;lt; len(sen):
       if Key == sen[i:i+Key_Len]:
            print('i',i)
            New_sen = New_sen + 'Dhoni'
            i+=Key_Len
       else:
            New_sen = New_sen + sen[i]
            i+=1
print(New_sen)       
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>stringfunction</category>
      <category>payilagam</category>
    </item>
    <item>
      <title>LCM &amp; GCD of two numbers</title>
      <dc:creator>Poornima Ravi</dc:creator>
      <pubDate>Mon, 30 Dec 2024 17:08:30 +0000</pubDate>
      <link>https://dev.to/poornima_ravi/lcm-gcd-of-two-numbers-231h</link>
      <guid>https://dev.to/poornima_ravi/lcm-gcd-of-two-numbers-231h</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#LCM of two numbers
Num1 = int(input('Enter the Number 1:'))
Num2 = int(input('Enter the Number 2:'))
def evaluateN(Num1,Num2):
    if Num1&amp;gt;Num2:
        N= Num1
    else:
        N= Num2  
    return N
LCM = 1
i = 2
N = evaluateN(Num1,Num2)
if Num1&amp;gt;1 or Num2&amp;gt;1: 
    print(Num1,Num2)
    while i&amp;lt;=N:
        if Num1%i ==0 and Num2%i ==0:
            Num1 = Num1//i
            Num2 = Num2//i
            LCM = LCM * i
            print('i:',i, '|',Num1,Num2)
            i=2
        elif Num1%i ==0 and Num2%i !=0:
            Num1 = Num1//i
            LCM = LCM * i
            print('i:',i,'|', Num1,Num2)
            i=2
        elif Num1%i !=0 and Num2%i ==0:
            Num2 = Num2//i
            LCM = LCM * i
            print('i:',i,'|', Num1,Num2)
            i=2
        else:
            i+=1   
        N = evaluateN(Num1,Num2)   
    print('LCM :', LCM)
elif Num1==Num2:
    print('LCM :',LCM)
else:
    print('Enter Valid Num')



#GCD of two Numbers
Num1 = int(input('Enter the Number 1:'))
Num2 = int(input('Enter the Number 2:'))
def evaluateN(Num1,Num2):
    if Num1&amp;gt;Num2:
        N= Num1
    else:
        N= Num2  
    return N
GCD = 1
i = 2
N = evaluateN(Num1,Num2)
if Num1&amp;gt;1 or Num2&amp;gt;1: 
    print(Num1,Num2)
    while i&amp;lt;=N:
        if Num1%i ==0 and Num2%i ==0:
            Num1 = Num1//i
            Num2 = Num2//i
            GCD = GCD * i
            print('i:',i, '|',Num1,Num2)
            i=2
        else:
            i+=1   
        N = evaluateN(Num1,Num2)   
    print('GCD:', GCD)
elif Num1==Num2:
    print('GCD:',GCD)
else:
    print('Enter Valid Num')

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>payilagam</category>
      <category>whileloop</category>
      <category>pythontutorial</category>
    </item>
    <item>
      <title>Python While Loop Tutorial #Day3</title>
      <dc:creator>Poornima Ravi</dc:creator>
      <pubDate>Sun, 29 Dec 2024 15:39:22 +0000</pubDate>
      <link>https://dev.to/poornima_ravi/python-while-loop-tutorial-day3-57nn</link>
      <guid>https://dev.to/poornima_ravi/python-while-loop-tutorial-day3-57nn</guid>
      <description>&lt;p&gt;Tasks on While Loop:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Armstrong Number 
351
3*3*3 5*5*5  1*1*1
27  +  125 +  1
153 -&amp;gt; not a Armstrong number&lt;/li&gt;
&lt;li&gt;Neon Number
A neon number is a number where the sum of digits of square of the number is equal to the number.
9 --&amp;gt; 81 --&amp;gt; 8+1 = 9 is a Neon Number&lt;/li&gt;
&lt;li&gt;Factorial of a Number
4 = 4! = 4*3*2*1 = 24&lt;/li&gt;
&lt;li&gt;Perfect Number
Sum of Divisors of a Number(except the num itself) returns the same number -&amp;gt; Perfect number
6 - 1, 2, 3 -&amp;gt; 1+2+3 = 6&lt;/li&gt;
&lt;li&gt;Prime Number&lt;/li&gt;
&lt;li&gt;List of Prime Number&lt;/li&gt;
&lt;li&gt;Emirp Number
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Armstrong

def Armstrong(count, Num):
    sum = 0
    i=0
    Out = Num
    while i&amp;lt;count:
        sum = sum + ((Num%10)**count)
        Num = Num//10
        i+=1
    if(sum == Out):
        print('Output:',sum,'Armstrong')
    else:
        print('Output:',sum,'Not a Armstrong')

Num = int(input('Enter the num:'))
count = 0
out = Num
while Num&amp;gt;=1:
    Num = Num//10
    count+=1
print('count :',count,' ')
Armstrong(count, out)


#Neon Number

Num = int(input("Enter the num:"))
Square = Num*Num
Neon = Num
Sum = 0
print(Square)
while Square &amp;gt;=1:
        Sum = Sum + (Square%10)
        Square = Square//10
if(Sum == Num):    
    print(Num,'Neon Number')
else:
    print(Num,'Not a Neon Number')



# Factorial of a Number

Num = int(input('Enter the Num:'))
Fact = 1
while Num&amp;gt;=1:
    Fact = Fact * Num
    Num = Num-1
print('Factorial:', Fact)

#Perfect Number

Num = int(input('Enter the number:'))
i = 1
sum = 0
while i&amp;lt;Num:
    if(Num%i == 0):
        sum = sum + i
    i+=1
if(sum == Num):
    print(Num,'is a perfect Number')
else:
    print(Num,'is not a perfect number')    

#Prime Number

Num = int(input('Enter the num:'))
i = 2
Prime = 1
if Num &amp;gt;1:
    while i&amp;lt;Num:
        if(Num%i == 0):
            Prime = 0
        i+=1
    if(Prime == 1):
        print(Num, 'is a prime number')
    else:
        print(Num, 'is not a prime number')
else:
    print('Enter a valid num')


#List of Prime Numbers
Num = int(input('Enter the num:'))
i = 2
Prime = 1
j= 2

if Num &amp;gt;1:
    while j &amp;lt;= Num:                    
        while i&amp;lt;j:
            if(j%i == 0):
                Prime = 0
            i+=1
        if(Prime == 1):
            print(j, 'is a prime number')
        Prime = 1
        i=2
        j+=1
else:
    print('Enter a valid num')


#Emirp Number
def isPrimeNumber(Num):
    i = 2
    Prime = 1
    if Num &amp;gt;1:
        while i&amp;lt;Num:
            if(Num%i == 0):
                Prime = 0
            i+=1
    return Prime
Num = int(input('Enter the num:'))
isPrime = isPrimeNumber(Num)
rev_Num = 0
if(isPrime == 1):
    rev = Num
    while Num &amp;gt;=1:
            rev_Num = rev_Num *10 + Num%10
            Num = Num//10
    print(rev_Num)
    isPrime = isPrimeNumber(rev_Num)
    if(isPrime ==1):
        print(rev,'is a Emirp Number')
    else:
        print(rev,'is not a Emirp Number')
else:
    print(Num,'is not a Emirp Number')



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>whileloop</category>
      <category>payilagam</category>
      <category>pythonbeginnerpractice</category>
    </item>
    <item>
      <title>Python While Loop Examples</title>
      <dc:creator>Poornima Ravi</dc:creator>
      <pubDate>Thu, 26 Dec 2024 19:33:18 +0000</pubDate>
      <link>https://dev.to/poornima_ravi/python-while-loop-examples-5aad</link>
      <guid>https://dev.to/poornima_ravi/python-while-loop-examples-5aad</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqwsrokqaa4nv89t70k9o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqwsrokqaa4nv89t70k9o.png" alt="Image description" width="702" height="260"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Tasks
# 2 4   6   8   10
#3  6   9   12  15
#1  3   5   7   9   2   4   6   8   10
#10 8   6   4   2
#9  7   5   3   1
#1  2   3   4   5   6   7   8   9   10
#1  RED BLUE RED 5 REDBLUE 7 RED BLUE RED


#Task 1
i=1
while i &amp;lt;= 10:
    if i%2 ==0:
        print(i, end =' ')
    i=i+1
print('')


#Task 2

i=1
while i &amp;lt;= 15:
    if i%3 ==0:
        print(i, end =' ')
    i=i+1
print('')

#Task 3 using 2 loops

i=1
while i&amp;lt;= 10:
    if i%2 != 0:
        print(i, end= ' ')
    i=i+1
i=1
while i&amp;lt;=10:
    if i%2 == 0:
        print(i, end =' ')
    i=i+1
print('')

#Task 3 using 1 loop

i=1
output = ''
while i&amp;lt;= 10:
    if i%2 != 0:
        print(i, end= ' ')
    elif i%2 == 0:
        output = output + str(i) + ' '
    i=i+1
else:
    print(output)

#Task 4

i=10
while i&amp;gt;=1:
    if i%2 == 0:
        print(i, end =' ')
    i=i-1
print('')

#Task 5

i=10
while i&amp;gt;=1:
    if i%2 != 0:
        print(i, end =' ')
    i=i-1
print('')

#Task 6 

i = 1
while i&amp;lt;=10:
    print(i, end =' ')
    i=i+1
print('')

#Task 7

i = 1
while i&amp;lt;=10:
    if i%2 == 0 and i%3 == 0:
        print('REDBLUE',end =' ')
    elif i%3 == 0:
        print('BLUE',end= ' ')
    elif i%2 == 0:
        print('RED',end =' ')
    else:
        print(i,end =' ')
    i=i+1
print('')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>whileloop</category>
      <category>payilagam</category>
      <category>day3</category>
    </item>
    <item>
      <title>Python Day 1</title>
      <dc:creator>Poornima Ravi</dc:creator>
      <pubDate>Tue, 24 Dec 2024 09:51:58 +0000</pubDate>
      <link>https://dev.to/poornima_ravi/python-day-1-2d1k</link>
      <guid>https://dev.to/poornima_ravi/python-day-1-2d1k</guid>
      <description>&lt;p&gt;'''Sample Program to get 2 Number inputs '''&lt;br&gt;
Num = input('Enter any Number :')&lt;br&gt;
Num1 = input('Enter any Number :')&lt;br&gt;
Total = Num + Num1 #-- --- Concatenates the values&lt;br&gt;
print(Total)&lt;br&gt;
print('Sum :',int(Num) + int(Num1))&lt;br&gt;
print('Difference : ',int(Num) - int(Num1))&lt;br&gt;
print('Multiplication : ',int(Num) * int(Num1))&lt;br&gt;
print('Division : ',int(Num) / int(Num1))&lt;br&gt;
print('Modulus : ',int(Num) % int(Num1))&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To run python file:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to the file path in Terminal using cd 'Path'&lt;/li&gt;
&lt;li&gt;Run python3 'File Name.py'&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Python processess every input received from the user as String. To perform any operations on the input , we need to typecast the input to desired datatype as above example.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>pythonbasics</category>
    </item>
  </channel>
</rss>
