<?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: S Mathan</title>
    <description>The latest articles on DEV Community by S Mathan (@maddy_mathan).</description>
    <link>https://dev.to/maddy_mathan</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%2F2956862%2Ff1fbb878-b965-47e2-8e1f-7d573258536e.png</url>
      <title>DEV Community: S Mathan</title>
      <link>https://dev.to/maddy_mathan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maddy_mathan"/>
    <language>en</language>
    <item>
      <title>18/04/2005 IN PYTHON</title>
      <dc:creator>S Mathan</dc:creator>
      <pubDate>Fri, 18 Apr 2025 14:21:18 +0000</pubDate>
      <link>https://dev.to/maddy_mathan/18042005-in-python-2kcd</link>
      <guid>https://dev.to/maddy_mathan/18042005-in-python-2kcd</guid>
      <description>&lt;p&gt;1)&lt;/p&gt;

&lt;h2&gt;
  
  
  FIND THE VOWEL:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; count=0
vowels="aeiou"
name="mathan"
for every_letter in name:
    if every_letter in vowels:
        count +=1
else:
    print(count)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2) &lt;/p&gt;

&lt;h2&gt;
  
  
  FIND THE FIRST LETTER AND LAST LATTER:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   sen=input("enter your name:")
print("first letter",sen[0])
print("last letter",sen[-1])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3)&lt;/p&gt;

&lt;h2&gt;
  
  
  SPACE PERSENT:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name="s mathan"
for letter in name:
    if letter ==' ':
        print('yes,space is present')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4)&lt;/p&gt;

&lt;h2&gt;
  
  
  CHECK THE SENTANCE TRUE OR FALSE:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   sen="today is good friday"
print("abcd"not in sen)

print("friday"in the sen)

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

&lt;/div&gt;



&lt;p&gt;5)&lt;/p&gt;

&lt;h2&gt;
  
  
  BREAK STATEMENT
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;count=0
vowels="aeiou"
name="mathan"
for every_letter in  name:
    print(every_letter,end='')
    if every_letter=='t':
        break

else:
    print("hi")

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

&lt;/div&gt;



</description>
      <category>python</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>DAY 10 in python</title>
      <dc:creator>S Mathan</dc:creator>
      <pubDate>Fri, 11 Apr 2025 03:56:26 +0000</pubDate>
      <link>https://dev.to/maddy_mathan/day-10-in-python-3ln</link>
      <guid>https://dev.to/maddy_mathan/day-10-in-python-3ln</guid>
      <description>&lt;p&gt;Father,daughter story.&lt;br&gt;
      Small girl asking to her father 5 rs daily.insted,father saying he'll give 1 rs on day 1 and so on until day 5.&lt;/p&gt;

&lt;p&gt;IN FATHER SIDE:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;total=0
    no=1
    while  no&amp;lt;=5:
      total = total+no
    print(total)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;RESULT:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ 15
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;IN DAUGHTER SIDE:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;total=0
    no=1
    while no&amp;lt;=5:
      total = total+5
      no=no+1
    print(total) 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;RESULT:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ 25
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
THE FATHER WAS PROFIT AS  $ 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>programming</category>
      <category>learning</category>
    </item>
    <item>
      <title>LOOPING IN PYTHON</title>
      <dc:creator>S Mathan</dc:creator>
      <pubDate>Thu, 10 Apr 2025 13:25:38 +0000</pubDate>
      <link>https://dev.to/maddy_mathan/looping-in-python-1djj</link>
      <guid>https://dev.to/maddy_mathan/looping-in-python-1djj</guid>
      <description>&lt;p&gt;&lt;strong&gt;LOOPING:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    no1 = int(input("enter no. "))
    no2 = int(input("enter no. "))
    if no1&amp;gt;no2:
      print(no1)
    if no1&amp;lt;no2:
      print(no2)
    else:
       print('no1 and no2 are same') 

    no = 1
    while no&amp;lt;=5;
      print(no,end='')
    no+=1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;VARIABLE LENGTH ARGUMENTS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  print('hi')
  print('hi','hello')
  print('maddy','mathan')
  print(5,10,15)
  print('09','april','2025',sep='-',end='/')
  print('09','april','2025',end=' ')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  ADDITION OF FIRST N NUMBERS:
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; no=1
  total=0
  while no&amp;lt;=5:
    print(no,end='')
    total=total+no
    no+=1
  print('\n',total,sep='')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  MULTIPLICATION OF FIRST N NUMBERS:
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  no=1
   total=5
   while no&amp;lt;5:
      print(no,end='')
      total=total*no
      no+=1
   print('\n',total,sep='')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;MISTAKE:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  no=1
    total=1
    while no&amp;lt;=5:
      total=total*no
      print(no,total,end='')
      no+=1
     print('\n',total,sep='')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;BREAK STATEMENT:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;no=1
  while no&amp;lt;=10:
    if no%6==0:
       break
    print(no)
    no+=1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; no=1
  while no&amp;lt;=5:
    if no%4==0:
      break
    print(no)
    no+=1
  else:
    print("hi",no)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ODD OR EVEN USING LOOP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;loop1 = 1
loop2 = 10

while loop1 &amp;lt;= loop2:
    if start % 2 == 0:
        print("It is Even")
    else:
        print("It is Odd")
    loop1 += 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;PRIME NUMBERS USING LOOP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;n = int(input("Enter a number: "))
j = 2
if n &amp;lt;= 1:
    print("Not Prime")
else:
    while j &amp;lt; n:
        if n % j == 0:
            print("Not Prime")
            break
        j += 1
    else:
        print("Prime")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Day-5,6,7,8 in python</title>
      <dc:creator>S Mathan</dc:creator>
      <pubDate>Wed, 09 Apr 2025 12:16:56 +0000</pubDate>
      <link>https://dev.to/maddy_mathan/day-5678-in-python-ekj</link>
      <guid>https://dev.to/maddy_mathan/day-5678-in-python-ekj</guid>
      <description>&lt;p&gt;MINI CALCULATOR:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; print("simple calculator")
        a = float(input("enter first number: "))
        b = float(input("enter second number: "))
        op = input("choose operation (+,-,*,/)

if op == '+':
  print("result:" , a + b)
elif op == '-':
  print("result:" , a - b)
elif op == '*':
  print("result:" , a * b)
elif op == '/':
  print("result:" , round(a / b,2))
else:
  print("Invalid operation")

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

&lt;/div&gt;



&lt;p&gt;LENGTH CHECKER:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name = input("Enter your name: ")
   print("your name has" , len(name), "character"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;PASSWORD LENGTH CHECK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name = intput("enter your password: ")
password = len(name)

if password &amp;lt;=8:
  print("your password is short")
if password &amp;gt;=10:
  print("your password is long")
if password == 9:
  print("your password is valid")

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

&lt;/div&gt;



&lt;p&gt;RETURN STATEMENTS:&lt;br&gt;
        A return statement ends the execution of a function, and returns control to the calling function. Execution resumes in the calling function at the point immediately following the call. A return statement can return a value to the calling function. For more information, see Return type.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def chitchat();
     print("chatting with friends:)

  def withdraw():
     print("entering",pin)
     return 500

  def watch():
     return CSk

chitchat()
purse = withdraw(1234)
print(purse)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def calculate_amount(unit):
  if unit&amp;lt;100:
    print('FREE')

elif unit&amp;lt;200:
    print(unit*1,20)

elif unit&amp;lt;300:
    print(unit*2)

consumed_units = eb_reading()
calculate_amount(consumed_units)

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

&lt;/div&gt;



&lt;p&gt;In python everything is an object.&lt;/p&gt;

&lt;p&gt;In python every python is a module.&lt;/p&gt;

&lt;p&gt;code reusability, Documentation string, name of file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import calc2
calc2.add(123,321)

print(calc2.__doc__)
print(dir(calc2))
print(calc2.__name__)
print(calc2.__file__)
print(calc2.__spec__)
print(calc2.package)

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

&lt;/div&gt;



&lt;p&gt;OTP GENERATOR:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import random:
print (random.__doc__)
print(dir(random))
print(round(round.random(),2)*100)
print(dir(random))
print(random.randint(100000,10000000)


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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import sys
print(sys.argv)
print(sys.__doc__)

python3 user.py mathan salman kuhan

print(sys.argv[1])

import sys
print(sys.path)
print(type(sys.path))
sys.path.append('folder')

import calc2
calc2.add(10,20)


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

&lt;/div&gt;



&lt;p&gt;OS MODULE:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os
print(os.getcwd())
os.mkdir("abcd")
os.chdir('home/muthu/documents/B10')
os.rmdir('home/muthu/documents/abcd')
print(os.listdir('home/muthu/Documents/B10)
os.makedirs('home/muthu/Documents/B10/Salman/mathan/kuhan')
os.removedirs('home/muthu/Documents/B10/Salman/mathan/kuhan')
os.rename('home/muthu/documents/abcd','home/muthu/documents/pqrs')

import os
print(os.__doc__)
print(os.utime('home/muthu/documents/B10/calc2.py')
print(help(os.time))
print(dir(os))

import os
print(os.path)

popen() --&amp;gt; function

import os
print(os.system("Python3 --version")

import os
print(os.listdir())
print(os.path.exists('home/muthu/documents/B10')
print(os.path.exists('os.py')

import os
print(os.path.getsize("calc.py"))

import os
print(os.cpucount())
print(os.getlogin())
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;SYS MODULE:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import sys
sys.version
sys.version_info
sys.stdout
sys.stdin
sys.floatinfo.
sys.intinfo
sys.copyright

import keyword
keyword.__doc__
keyword.kwlist
len(keyword.kwlist)

help('import')
help('False')

ESC + shift + : + q --&amp;gt; exiting one terminal

import sys
print(sys.executable)
print(sys.platform)

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

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Argument in python</title>
      <dc:creator>S Mathan</dc:creator>
      <pubDate>Fri, 04 Apr 2025 11:21:37 +0000</pubDate>
      <link>https://dev.to/maddy_mathan/argument-in-python-5gg2</link>
      <guid>https://dev.to/maddy_mathan/argument-in-python-5gg2</guid>
      <description>&lt;p&gt;DATE:3/4/25&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Default argument:&lt;/strong&gt;&lt;br&gt;
    def login(username,password='test@123')&lt;br&gt;
       print(username,'logged in with password',password)&lt;/p&gt;

&lt;p&gt;Login('admin','abcd1234')&lt;br&gt;
login('admin')&lt;/p&gt;

&lt;h1&gt;
  
  
  if argument is not given,default value present in function parameter will be considered.
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;#positional argument:&lt;/strong&gt;&lt;br&gt;
    Def login(username,password):&lt;br&gt;
      print(username,'logged in with password,password)&lt;br&gt;
 login ('admin','abcd1234)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;#keyword arguments&lt;/strong&gt;&lt;br&gt;
      Def(username,'logged in with password',password)&lt;/p&gt;

&lt;p&gt;login(password='abcd1234',username='admin')&lt;br&gt;
         |                    |&lt;br&gt;
      keyword              keyword&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h1&gt;
  
  
  how to you find data type of a variable ?**
&lt;/h1&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    no=10
    print(type(no))
    print(id(no))----&amp;gt;How to fin memory id of a variable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;EXAMPLE:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1) DEFAULT ARGUMENT:&lt;br&gt;
        def login(userid,password='mathan@123') &lt;br&gt;
          print(userid,'logged with password',password)&lt;br&gt;
       login('class','mak123')&lt;br&gt;
       login('class') &lt;/p&gt;

&lt;p&gt;2) POSITIONAL ARGUMENT:&lt;br&gt;
       def login(userid,password)&lt;br&gt;
          print(userid,'logged in with password',password)&lt;br&gt;
       login('class','password')&lt;/p&gt;

&lt;p&gt;3) KEYWORD ARGUMENT:&lt;br&gt;
       def(userid,'logged in with password',password)&lt;br&gt;
login(password='mak123',userid='class')&lt;/p&gt;

</description>
    </item>
    <item>
      <title>what is arguments in python</title>
      <dc:creator>S Mathan</dc:creator>
      <pubDate>Wed, 02 Apr 2025 21:07:46 +0000</pubDate>
      <link>https://dev.to/maddy_mathan/what-is-arguments-in-python-4bn6</link>
      <guid>https://dev.to/maddy_mathan/what-is-arguments-in-python-4bn6</guid>
      <description>&lt;p&gt;&lt;strong&gt;Arguments:&lt;/strong&gt;&lt;br&gt;
      In Python, an argument is a value passed to a function when it's called, allowing the function to perform different actions or operations based on the input. &lt;br&gt;
      *Function Definition: When you define a function, you might specify parameters (variables) that the function will use.&lt;br&gt;
     *Function Call: When you call the function, you provide values for those parameters, and these values are called arguments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Types of arguments:&lt;/strong&gt; &lt;br&gt;
         *Positional Arguments: Arguments passed in the order they are defined in the function.&lt;br&gt;
         *Keyword Arguments: Arguments passed with the parameter name (e.g., greet(name="Bob")).&lt;br&gt;
         *Default Arguments: Arguments with default values that are optional during the function call.&lt;br&gt;
         *Variable-Length Arguments: Arguments that allow functions to accept a variable number of arguments (using *args and **kwargs). &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are the argument in parameters:&lt;/strong&gt;&lt;br&gt;
      In programming, parameters are placeholders defined in a function's signature, while arguments are the actual values passed to the function when it's called.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        ---------------------x----------------------- 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;2/4/25&lt;br&gt;
      In python,variable is an object is it so? In python,everything is an object python is strongly object oriented programming language.&lt;br&gt;
    pointers in c&lt;/p&gt;

&lt;p&gt;object represent class.&lt;br&gt;
object is sample of class.&lt;br&gt;
object is instance of class.&lt;/p&gt;

&lt;p&gt;object cannot be present without class-True/false =True&lt;br&gt;
class can be present without object -  True/false =True&lt;/p&gt;

&lt;p&gt;python is dynamically typed programming language.&lt;/p&gt;

&lt;p&gt;name='salman'&lt;br&gt;
age=25&lt;br&gt;
height=5.6&lt;/p&gt;

&lt;p&gt;amount=10000&lt;br&gt;
intrest=7.5&lt;br&gt;
months=12&lt;/p&gt;

&lt;p&gt;print((int)(amount*intrest*months))920000.6776&lt;br&gt;
   no=121212222222222&lt;br&gt;
   print=(no)&lt;/p&gt;

&lt;p&gt;*print add(no1.no2):&lt;br&gt;
   print(no1+no2)&lt;br&gt;
*print sub(no1,no2)&lt;br&gt;
   print(no1-no2)&lt;br&gt;
*print multi(no1,no2)&lt;br&gt;
   print(no1*no2)&lt;br&gt;
*print div(no1,no2)&lt;br&gt;
   print(no1/no2)&lt;br&gt;
*print modulo div(no1,no2(&lt;br&gt;
   print(no1%no2)&lt;/p&gt;

&lt;h1&gt;
  
  
  def-----&amp;gt;definition
&lt;/h1&gt;

&lt;h1&gt;
  
  
  add-----&amp;gt;function name
&lt;/h1&gt;

&lt;h1&gt;
  
  
  no1,no2-&amp;gt;arguments/parameters
&lt;/h1&gt;

&lt;h1&gt;
  
  
  arguments/parameters
&lt;/h1&gt;

&lt;p&gt;#input given a function.&lt;/p&gt;

&lt;p&gt;function calling&lt;br&gt;
  add(10,20)&lt;br&gt;
  sub(100,50)&lt;br&gt;
  multiply(2,3)&lt;/p&gt;

</description>
    </item>
    <item>
      <title>PYTHON</title>
      <dc:creator>S Mathan</dc:creator>
      <pubDate>Wed, 02 Apr 2025 12:00:12 +0000</pubDate>
      <link>https://dev.to/maddy_mathan/python-4ge9</link>
      <guid>https://dev.to/maddy_mathan/python-4ge9</guid>
      <description>&lt;p&gt;What is function in python:&lt;br&gt;
           *In Python, a function is a reusable block of code that performs a specific task, allowing you to organize and modularize your code. &lt;br&gt;
          *Functions in Python. You use functions in programming to bundle a set of instructions that you want to use repeatedly or that, because of their complexity, are better self-contained in a sub-program and called when needed. That means that a function is a piece of code written to carry out a specified task&lt;/p&gt;

&lt;p&gt;TYPES OF FUNCTION:&lt;br&gt;
      The  are two types of function:&lt;br&gt;
          *built in function&lt;br&gt;
          *user define function&lt;/p&gt;

&lt;p&gt;BUILT IN FUNCTION:&lt;br&gt;
      Predefined functions provided by Python, like print(), len(), etc. &lt;/p&gt;

&lt;p&gt;USER DEFINE FUNCTION:&lt;br&gt;
       Functions that you create yourself to perform specific tasks. &lt;/p&gt;

&lt;p&gt;DEFINE A FUNCTION:&lt;br&gt;
       A function is defined as a relation between a set of inputs having one output each. In simple words, a function is a relationship between inputs where each input is related to exactly one output. Every function has a domain and codomain or range. A function is generally denoted by f(x) where x is the input.&lt;/p&gt;

&lt;p&gt;WHAT IS VARIABLE IN PYTHON:&lt;br&gt;
    *In Python, a variable is a named memory location that stores a value. Variables are used to store information that will be used during the program.&lt;br&gt;
     *Python variables are simply containers for storing data values. Unlike other languages, such as Java, Python has no command for declaring a variable, so you create one the moment you first assign a value to it. Python variables are simply containers for storing data values.&lt;/p&gt;

&lt;p&gt;HOW TO CREATE A VARIABLE:&lt;br&gt;
       *To create a variable, use the assignment equal sign (=)&lt;br&gt;
       *Put the variable's name on the left and the value it should store on the right&lt;br&gt;
       *For example, x = 42 &lt;/p&gt;

&lt;p&gt;Types of variables:&lt;/p&gt;

&lt;p&gt;1) &lt;strong&gt;Local variables&lt;/strong&gt;: Defined inside a function and can only be accessed within that function &lt;/p&gt;

&lt;p&gt;2) &lt;strong&gt;Global variables&lt;/strong&gt;: Defined outside of any function and can be accessed from anywhere in the code&lt;br&gt;&lt;br&gt;
   3) &lt;strong&gt;Booleans&lt;/strong&gt;: Have two possible values: True and False &lt;br&gt;
   4) &lt;strong&gt;Tuples&lt;/strong&gt;: Store multiple items in a single variable &lt;br&gt;
   5) &lt;strong&gt;Strings&lt;/strong&gt;: Sequences of characters, and you can think of them as words or sentences &lt;br&gt;
   6) &lt;strong&gt;Integers&lt;/strong&gt;: Whole numbers, negative, positive or zero &lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     --------------------x-------------------&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h1&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  portable&lt;br&gt;
&lt;/h1&gt;

&lt;p&gt;*object oriented programming&lt;br&gt;
  *multi paradigm language&lt;br&gt;
  *procedural oriented-c&lt;br&gt;
  *modular programming-module&lt;/p&gt;

&lt;p&gt;WHAT IS FUNCTION:&lt;br&gt;
  (Set of instruction with a name)&lt;br&gt;
 attending_class:&lt;br&gt;
   1.dress&lt;br&gt;
   2.walking&lt;br&gt;
   3.entering&lt;br&gt;
   4.sitting&lt;br&gt;
   5.listening&lt;br&gt;
   6.taking notes.&lt;/p&gt;

&lt;p&gt;ride_bike()&lt;br&gt;
  input()&lt;/p&gt;

&lt;p&gt;Naming convention for functions:&lt;br&gt;
  1.function name should be meaningful&lt;br&gt;
     sit,stand,abcd,pqrs.&lt;br&gt;
  2.function should not be nonu,should be verb.&lt;br&gt;
  3.should end with()&lt;/p&gt;

&lt;p&gt;name=input()&lt;br&gt;
print ("welcome to python",name)&lt;/p&gt;

&lt;p&gt;~ --&amp;gt;tilde&lt;br&gt;
`` -&amp;gt;back ticks.&lt;/p&gt;

&lt;p&gt;pwd    --&amp;gt; print working directory&lt;br&gt;
folder --&amp;gt; directory&lt;/p&gt;

&lt;p&gt;Terminal&lt;br&gt;
----&amp;gt; pwd&lt;br&gt;
----&amp;gt; ls&lt;/p&gt;

&lt;p&gt;ls --&amp;gt;listing all files ond folder in a directors.&lt;/p&gt;

&lt;p&gt;cd docu / bio --&amp;gt;tab&lt;br&gt;
cd            --&amp;gt;enter&lt;/p&gt;

&lt;p&gt;cd bio&lt;br&gt;
       (.)--&amp;gt;current directory.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>OPEN SOURCE</title>
      <dc:creator>S Mathan</dc:creator>
      <pubDate>Sat, 29 Mar 2025 20:07:23 +0000</pubDate>
      <link>https://dev.to/maddy_mathan/open-source-32gd</link>
      <guid>https://dev.to/maddy_mathan/open-source-32gd</guid>
      <description>&lt;p&gt;&lt;strong&gt;USES OF OPEN SOURCE SOFTWARE :&lt;/strong&gt;&lt;br&gt;
                   Software programmers and application developers are the primary users of open source software. Depending on the software selected, developers can use the open source code, programming language and operating system to create new applications and other resources (e.g., web pages) without the need to obtain proprietary software (typically called closed source software) and their proprietary licenses. While open source software licenses must be approved, the flexibility of open source software ensures that apps can be created for a nominal investment and tailored to an organization's needs.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;       Dynamically type programming language(python).
       statically typed programming language(c,c++,c#,java).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Data type:
&lt;/h2&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;      int- 100,200,10,20----&amp;gt;int
      1.23,2.54,6.8,3.5-----&amp;gt;float
      mathan kuhan salman---&amp;gt;str(string)
      true (or) false    ---&amp;gt;bool(boolean)
      4+5i(real,imaginary)--&amp;gt;complex

      python eg
             mathan_age=20
             greetings="happy birthday"
             height=2.8
             raining=false
             hotday =true.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;DYNAMIC TYPED PROGRAMMING LANGUAGE:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  There is no need to explicity tell the data type.
  python will automatically understand.The datatype for the given reference variable.
eg.age=20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Terminal copy --&amp;gt;ctrl+shift+c&lt;br&gt;
 Terminal copy --&amp;gt;ctrl+shift+v&lt;/p&gt;

&lt;h2&gt;
  
  
  PYTHON:
&lt;/h2&gt;

&lt;p&gt;addition    ---&amp;gt; (+)&lt;br&gt;
   subtraction ---&amp;gt; (-)&lt;br&gt;
   multiplication--&amp;gt;(&lt;em&gt;)&lt;br&gt;
   division      --&amp;gt;(/)&lt;br&gt;
   madulo devision-&amp;gt;(%)&lt;br&gt;
   floor division--&amp;gt;(//)&lt;br&gt;
   power         --&amp;gt;(&lt;/em&gt;*)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benefits of open source:&lt;/strong&gt;&lt;br&gt;
                       Open source is generally much more cost-effective than a proprietary solution. Not only are open source solutions typically much more inexpensive in an enterprise environment for equivalent or superior capability, but they also give enterprises the ability to start small and scale .&lt;/p&gt;

</description>
    </item>
    <item>
      <title>GIT</title>
      <dc:creator>S Mathan</dc:creator>
      <pubDate>Fri, 28 Mar 2025 09:34:23 +0000</pubDate>
      <link>https://dev.to/maddy_mathan/git-3a72</link>
      <guid>https://dev.to/maddy_mathan/git-3a72</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`Git clone
Document create 
Git add .-&amp;gt;all/document
Git commit - m"message"
git restore --staged document name
git push
git pull
touch document(create a use new fill)
git add
git commit
git status(to use check the condition)
git stash
git stash ls
git pop 0
git pop
git diff 
git log
git branch docname
git checkout docname
git merge
git rebase
git cherry-pick`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>git</category>
      <category>programming</category>
      <category>devdiscuss</category>
    </item>
    <item>
      <title>Open source</title>
      <dc:creator>S Mathan</dc:creator>
      <pubDate>Thu, 27 Mar 2025 17:57:27 +0000</pubDate>
      <link>https://dev.to/maddy_mathan/open-source-2n8b</link>
      <guid>https://dev.to/maddy_mathan/open-source-2n8b</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;br&gt;
          open source refers to software whose source code is made freely available for anyone to use,modify,and distribute,fostering collaboration and transparency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Source code accessibility:&lt;/strong&gt;&lt;br&gt;
         open source software is characterized by having its source code readily accessible to the public.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Free Redistribution&lt;/strong&gt; &lt;br&gt;
         The software can be freely redistributed, meaning users can share it with others without restrictions. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Modification and Enhancement:&lt;/strong&gt;&lt;br&gt;
         Users are typically allowed to modify and enhance the software to suit their needs, and even contribute these changes back to the original project. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transparency and Collaboration:&lt;/strong&gt;&lt;br&gt;
         The open nature of open source projects encourages collaboration and transparency among developers and users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;br&gt;
         Popular examples of open source software include Linux, Python, and Apache.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open Source Initiative:&lt;/strong&gt;&lt;br&gt;
         The Open Source Initiative (OSI) has created a formal definition that lays out the requirements for a software license to be truly open source.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open Source Licenses:&lt;/strong&gt;&lt;br&gt;
Open source licenses are sometimes categorized as “permissive”—allowing users to copyright their own works—or “protective,” like copyleft. &lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
