<?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: yugalakshmi</title>
    <description>The latest articles on DEV Community by yugalakshmi (@yugav).</description>
    <link>https://dev.to/yugav</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F99mvlsfu5tfj9m7ku25d.png</url>
      <title>DEV Community: yugalakshmi</title>
      <link>https://dev.to/yugav</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yugav"/>
    <language>en</language>
    <item>
      <title>Python Task</title>
      <dc:creator>yugalakshmi</dc:creator>
      <pubDate>Tue, 17 Nov 2026 09:22:29 +0000</pubDate>
      <link>https://dev.to/yugav/python-task-2p63</link>
      <guid>https://dev.to/yugav/python-task-2p63</guid>
      <description>&lt;p&gt;Chapathi Story There is one person called Viyan. He is a Software Engineer. He employs a maid for cooking. One day, the maid prepared n number of chapatis and kept in a hot box. Viyan are those chapatis and the count is as follows: * For Morning breakfast, he completed 1/3 number of chapathis in the hot box. * For Lunch, He had 1/3 of what was there in the hot box. * For Dinner, again he took and ate 1/3 number of chapathis present in the box. The next day morning, When the maid checked the number of chapathis remaining, it was 8. What was the number of chapathis, She made - in total?&lt;/p&gt;

&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgl1hdg652dt7x97z1373.jpg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgl1hdg652dt7x97z1373.jpg" alt="Flowchart showing a reverse loop starting with 8 chapathis and running 3 times to multiply by 3 and integer-divide by 2, outputting the initial total of 27 chapathis."&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://dev.tourl"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;chapathis&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;
&lt;span class="n"&gt;meals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;meals&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;chapathis&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chapathis&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
    &lt;span class="n"&gt;meals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;meals&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Total chapathis:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;chapathis&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&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;outout

Total chapathis: 27

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

&lt;/div&gt;



</description>
      <category>python</category>
    </item>
    <item>
      <title>Local and Global Variables in Python</title>
      <dc:creator>yugalakshmi</dc:creator>
      <pubDate>Fri, 13 Nov 2026 18:04:16 +0000</pubDate>
      <link>https://dev.to/yugav/local-and-global-variables-in-python-1ilf</link>
      <guid>https://dev.to/yugav/local-and-global-variables-in-python-1ilf</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Local Variable&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A local variable is declared inside a function. It can be accessed only within that function.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;def eat(amount):&lt;br&gt;
    total = 500&lt;br&gt;
    return total - amount&lt;/p&gt;

&lt;p&gt;print(eat(100))&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;400&lt;/p&gt;

&lt;p&gt;Here, total and amount are local to the function.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Global Variable&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A global variable is declared outside a function. It can be accessed inside different functions.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;total = 100000&lt;/p&gt;

&lt;p&gt;def eat(amount):&lt;br&gt;
    return total - amount&lt;/p&gt;

&lt;p&gt;print(eat(500))&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;99500&lt;/p&gt;

&lt;p&gt;Here, total is a global variable and amount is a local parameter.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Global Keyword&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The global keyword is used to modify a global variable inside a function.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;total = 100&lt;/p&gt;

&lt;p&gt;def update():&lt;br&gt;
    global total&lt;br&gt;
    total = 500&lt;/p&gt;

&lt;p&gt;update()&lt;br&gt;
print(total)&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;500&lt;/p&gt;

&lt;p&gt;Here, the global keyword allows us to modify the global variable total.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Local and Global Variables in Function Calling&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When we call a function inside another function, the variables do not automatically become global.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;total = 100&lt;/p&gt;

&lt;p&gt;def check(no1):&lt;br&gt;
    print(total - no1)&lt;/p&gt;

&lt;p&gt;print(total)&lt;br&gt;
check(10)&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;100&lt;br&gt;
90&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Pure Function and Impure Function</title>
      <dc:creator>yugalakshmi</dc:creator>
      <pubDate>Fri, 13 Nov 2026 18:00:02 +0000</pubDate>
      <link>https://dev.to/yugav/pure-function-and-impure-function-5b1l</link>
      <guid>https://dev.to/yugav/pure-function-and-impure-function-5b1l</guid>
      <description>&lt;p&gt;&lt;strong&gt;Pure Function&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A pure function gives the same output for the same input. It does not change external data.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;def add(a, b):&lt;br&gt;
    return a + b&lt;/p&gt;

&lt;p&gt;print(add(10, 20))&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;30&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Impure Function&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An impure function depends on or changes external data or produces side effects.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;total = 100&lt;/p&gt;

&lt;p&gt;def add(amount):&lt;br&gt;
    global total&lt;br&gt;
    total = total + amount&lt;/p&gt;

&lt;p&gt;add(50)&lt;br&gt;
print(total)&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;150&lt;/p&gt;

&lt;p&gt;Here, the function changes the global variable total, so it is an impure function.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Keyword-Only Arguments</title>
      <dc:creator>yugalakshmi</dc:creator>
      <pubDate>Fri, 13 Nov 2026 17:58:07 +0000</pubDate>
      <link>https://dev.to/yugav/keyword-only-arguments-d6f</link>
      <guid>https://dev.to/yugav/keyword-only-arguments-d6f</guid>
      <description>&lt;p&gt;The * symbol is used to make parameters keyword-only.&lt;/p&gt;

&lt;p&gt;We must pass values using parameter names.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;def calculate(a, *, b):&lt;br&gt;
    print(a + b)&lt;/p&gt;

&lt;p&gt;calculate(a=10, b=20)&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;30&lt;/p&gt;

&lt;p&gt;Here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;is a keyword-only separator.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We must pass b using its name.&lt;/p&gt;

&lt;p&gt;The following call is incorrect:&lt;/p&gt;

&lt;p&gt;calculate(10, 20)&lt;/p&gt;

&lt;p&gt;It gives a TypeError because b must be passed as a keyword argument.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>coding</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Positional-Only Arguments</title>
      <dc:creator>yugalakshmi</dc:creator>
      <pubDate>Fri, 13 Nov 2026 17:56:30 +0000</pubDate>
      <link>https://dev.to/yugav/positional-only-arguments-c0e</link>
      <guid>https://dev.to/yugav/positional-only-arguments-c0e</guid>
      <description>&lt;p&gt;The / symbol is used to make parameters positional-only.&lt;/p&gt;

&lt;p&gt;We must pass values based on their position. We cannot use keyword arguments.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;def calculate(a, b, /):&lt;br&gt;
    print(a + b)&lt;/p&gt;

&lt;p&gt;calculate(10, 20)&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;30&lt;/p&gt;

&lt;p&gt;Here:&lt;/p&gt;

&lt;p&gt;/ is a positional-only separator.&lt;/p&gt;

&lt;p&gt;We must pass arguments by position.&lt;/p&gt;

&lt;p&gt;calculate(a=10, b=20)&lt;/p&gt;

&lt;p&gt;This gives a TypeError because keyword arguments are not allowed for these parameters.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>coding</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Difference Between Parameters and Arguments</title>
      <dc:creator>yugalakshmi</dc:creator>
      <pubDate>Fri, 13 Nov 2026 17:52:41 +0000</pubDate>
      <link>https://dev.to/yugav/difference-between-parameters-and-arguments-44pm</link>
      <guid>https://dev.to/yugav/difference-between-parameters-and-arguments-44pm</guid>
      <description>&lt;p&gt;Parameters: Variables used in the function definition.&lt;/p&gt;

&lt;p&gt;Arguments: Actual values passed during the function call.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;def add(a, b):&lt;br&gt;
    print(a + b)&lt;/p&gt;

&lt;p&gt;add(10, 20)&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;30&lt;/p&gt;

&lt;p&gt;Here:&lt;/p&gt;

&lt;p&gt;a and b are Parameters.&lt;/p&gt;

&lt;p&gt;10 and 20 are Arguments.&lt;/p&gt;

&lt;p&gt;Remember:&lt;/p&gt;

&lt;p&gt;Parameters = Variables in function definition.&lt;/p&gt;

&lt;p&gt;Arguments = Values in function call.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Functions in Python-6</title>
      <dc:creator>yugalakshmi</dc:creator>
      <pubDate>Fri, 13 Nov 2026 17:37:07 +0000</pubDate>
      <link>https://dev.to/yugav/functions-in-python-6-3ak7</link>
      <guid>https://dev.to/yugav/functions-in-python-6-3ak7</guid>
      <description>&lt;p&gt;&lt;strong&gt;9. Return Statement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The return statement is used to send a result from a function back to the calling code.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
def add(no1, no2):&lt;br&gt;
    return no1 + no2&lt;/p&gt;

&lt;p&gt;result = add(10, 20)&lt;br&gt;
print(result)&lt;br&gt;
&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
30&lt;br&gt;
Here, return sends the result back to the function call.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;**Important Points:&lt;/em&gt;*&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We can define multiple functions in one Python file.&lt;/li&gt;
&lt;li&gt;We can call any defined function.&lt;/li&gt;
&lt;li&gt;A function must be defined before it is called during normal execution.&lt;/li&gt;
&lt;li&gt;If we define the same function name again, the latest definition replaces the previous one.**&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
   Functions are an important concept in Python. They help us divide large programs into smaller tasks, reuse code, and make programs easier to understand and maintain.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>code</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Functions in Python-5</title>
      <dc:creator>yugalakshmi</dc:creator>
      <pubDate>Fri, 13 Nov 2026 17:34:38 +0000</pubDate>
      <link>https://dev.to/yugav/functions-in-python-5-1n3g</link>
      <guid>https://dev.to/yugav/functions-in-python-5-1n3g</guid>
      <description>&lt;p&gt;&lt;strong&gt;7. Multiple Function Definitions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We can define multiple functions in the same Python file.&lt;/p&gt;

&lt;p&gt;We can call any function whenever we need it.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
def add():&lt;br&gt;
    print(5 + 10)&lt;/p&gt;

&lt;p&gt;def subtract():&lt;br&gt;
    print(10 - 5)&lt;/p&gt;

&lt;p&gt;def multiply():&lt;br&gt;
    print(10 * 2)&lt;/p&gt;

&lt;p&gt;def divide():&lt;br&gt;
    print(100 / 2)&lt;/p&gt;

&lt;p&gt;add()&lt;br&gt;
subtract()&lt;br&gt;
multiply()&lt;br&gt;
divide()&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
15&lt;br&gt;
5&lt;br&gt;
20&lt;br&gt;
50.0&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. Function Overloading&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Function overloading means using the same function name with different numbers or types of arguments.&lt;/p&gt;

&lt;p&gt;In languages like Java, function overloading is supported directly.&lt;/p&gt;

&lt;p&gt;Python does not support traditional function overloading using multiple definitions. If we define the same function name again, the latest definition replaces the previous one.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Functions in Python-4</title>
      <dc:creator>yugalakshmi</dc:creator>
      <pubDate>Fri, 13 Nov 2026 17:32:10 +0000</pubDate>
      <link>https://dev.to/yugav/functions-in-python-4-483p</link>
      <guid>https://dev.to/yugav/functions-in-python-4-483p</guid>
      <description>&lt;p&gt;&lt;strong&gt;6. Parameters and Arguments&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Parameters and arguments are used to pass values to a function.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Parameters: Variables mentioned inside the function definition.&lt;/li&gt;
&lt;li&gt;Arguments: Actual values passed during the function call.
Example:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;def add(no1, no2):&lt;br&gt;
    print(no1 + no2)&lt;/p&gt;

&lt;p&gt;add(100, 200)&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;300&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;no1 and no2 are parameters.&lt;/li&gt;
&lt;li&gt;100 and 200 are arguments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Function with Three Parameters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;def add(no1, no2, no3):&lt;br&gt;
    print(no1 + no2 + no3)&lt;/p&gt;

&lt;p&gt;add(5, 10, 15)&lt;br&gt;
Output:&lt;br&gt;
30&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Functions in Python-3</title>
      <dc:creator>yugalakshmi</dc:creator>
      <pubDate>Fri, 13 Nov 2026 17:27:54 +0000</pubDate>
      <link>https://dev.to/yugav/functions-in-python-3-57gc</link>
      <guid>https://dev.to/yugav/functions-in-python-3-57gc</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Why Do We Need Functions?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Functions provide many benefits:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Code Reusability: We can use the same code multiple times.&lt;/li&gt;
&lt;li&gt;Easy Maintenance: Changes can be made easily.&lt;/li&gt;
&lt;li&gt;Readability: Code becomes easier to understand.&lt;/li&gt;
&lt;li&gt;Modularity: Large programs can be divided into small parts.&lt;/li&gt;
&lt;li&gt;Easy Testing: We can test each function separately.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;5. Predefined Functions&lt;/strong&gt;&lt;br&gt;
Python already provides some built-in functions. We can use them directly.&lt;/p&gt;

&lt;p&gt;Examples:&lt;br&gt;
print("Good Morning")&lt;/p&gt;

&lt;p&gt;print(bin(4))&lt;br&gt;
print(bin(5))&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Good Morning&lt;br&gt;
0b100&lt;br&gt;
0b101&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;print() displays output.&lt;/li&gt;
&lt;li&gt;bin() converts an integer into a binary string.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>function</category>
    </item>
    <item>
      <title>Functions in Python-2</title>
      <dc:creator>yugalakshmi</dc:creator>
      <pubDate>Fri, 13 Nov 2026 17:23:47 +0000</pubDate>
      <link>https://dev.to/yugav/functions-in-python-2-470f</link>
      <guid>https://dev.to/yugav/functions-in-python-2-470f</guid>
      <description>&lt;ol&gt;
&lt;li&gt;How to Call a Function?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To execute a function, we need to call it using its name.&lt;br&gt;
def play():&lt;br&gt;
    print("Playing Cricket")&lt;/p&gt;

&lt;p&gt;play()&lt;br&gt;
Output:&lt;br&gt;
Playing Cricket&lt;br&gt;
play() is called a function call.&lt;/p&gt;

&lt;p&gt;We can call the same function multiple times.&lt;br&gt;
def welcome():&lt;br&gt;
    print("Welcome To Python")&lt;/p&gt;

&lt;p&gt;welcome()&lt;br&gt;
welcome()&lt;br&gt;
welcome()&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
Welcome To Python&lt;br&gt;
Welcome To Python&lt;br&gt;
Welcome To Python&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Functions in Python-1</title>
      <dc:creator>yugalakshmi</dc:creator>
      <pubDate>Fri, 13 Nov 2026 17:22:21 +0000</pubDate>
      <link>https://dev.to/yugav/functions-in-python-1-42la</link>
      <guid>https://dev.to/yugav/functions-in-python-1-42la</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before learning Functions, we should know:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Variables / Identifiers&lt;/li&gt;
&lt;li&gt;Data Types&lt;/li&gt;
&lt;li&gt;Operators&lt;/li&gt;
&lt;li&gt;Keywords&lt;/li&gt;
&lt;li&gt;Functions&lt;/li&gt;
&lt;li&gt;What is a Function?
A function is a set of instructions or a block of code used to perform a specific task.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In simple words, a function is a task or job.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Attending a class&lt;/li&gt;
&lt;li&gt;Playing cricket&lt;/li&gt;
&lt;li&gt;Adding two numbers&lt;/li&gt;
&lt;li&gt;Sending a message
Example: Playing Cricket
Steps involved in playing cricket:&lt;/li&gt;
&lt;li&gt;Invite friends.&lt;/li&gt;
&lt;li&gt;Take a bat and ball.&lt;/li&gt;
&lt;li&gt;Go to the ground.&lt;/li&gt;
&lt;li&gt;Toss.&lt;/li&gt;
&lt;li&gt;Start batting or fielding.
These steps together perform one task: Playing Cricket.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;How to Create a Function in Python?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We use the def keyword to define a function.&lt;/p&gt;

&lt;p&gt;Syntax:&lt;/p&gt;

&lt;p&gt;def function_name():&lt;br&gt;
    statements&lt;br&gt;
Example:&lt;/p&gt;

&lt;p&gt;def play():&lt;br&gt;
    print("Calling friends")&lt;br&gt;
    print("Taking bat and ball")&lt;br&gt;
    print("Going to ground")&lt;br&gt;
    print("Playing cricket")&lt;/p&gt;

&lt;p&gt;Here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;def is a keyword used to define a function.&lt;/li&gt;
&lt;li&gt;play is the function name.&lt;/li&gt;
&lt;li&gt;() represents the function parameters.&lt;/li&gt;
&lt;li&gt;Indentation represents the function body.&lt;/li&gt;
&lt;/ul&gt;

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