<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by KHAJI ZUBER 24BCA7092 on Medium]]></title>
        <description><![CDATA[Stories by KHAJI ZUBER 24BCA7092 on Medium]]></description>
        <link>https://medium.com/@zuber.24bca7092?source=rss-015f391cc9f4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*qucywT0XtfuBT83e</url>
            <title>Stories by KHAJI ZUBER 24BCA7092 on Medium</title>
            <link>https://medium.com/@zuber.24bca7092?source=rss-015f391cc9f4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 22 May 2026 18:49:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zuber.24bca7092/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[FUNCTIONS IN PYTHON]]></title>
            <link>https://medium.com/@zuber.24bca7092/functions-in-python-8bcfb00ada71?source=rss-015f391cc9f4------2</link>
            <guid isPermaLink="false">https://medium.com/p/8bcfb00ada71</guid>
            <dc:creator><![CDATA[KHAJI ZUBER 24BCA7092]]></dc:creator>
            <pubDate>Tue, 03 Dec 2024 16:21:54 GMT</pubDate>
            <atom:updated>2024-12-03T16:21:54.103Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*gmAiq3xp1nTNJSyZKrdw_Q.jpeg" /></figure><p>Functions in python is one of the major part, where we can use them to store data or even we can say, saving a piece of code by defining and storing in the memory and reuse it. Now, let’s see how the syntax written here.</p><p><strong>SYNTAX:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*lL1xm7DuAqa6iFX9KIQ2lg.jpeg" /></figure><p>It is a general syntax to write functions in python, which should be used for many applications which we will discuss below.</p><p><strong>EXPLANATION OF SYNTAX:</strong></p><p>We use command “def” to define the function by its name by taking arguments in the paranthesis of functions name. Here colon(:) is one of the most important thing to start an inner loop and in the inner loop we can add our statements or commands, which should be followed to give results, and in the next line in the same inner loop we should use return command as it takes the values.</p><p>Let us see a few examples on it.</p><p><strong>EXAMPLE 1:</strong></p><p>Sum of two numbers.</p><p><em>INPUT:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/304/1*zi740EPxHjrOon0WfAaLpw.jpeg" /></figure><p>Here we are defining the variables or arguments and returning it. Let’s take the values of a, b as 7, 7 respectively and store them to a variable called result. Use “print” command to get the output.</p><p><em>OUTPUT:</em></p><p>We will get the output as 14 which is the sum of the values of a and b.</p><p><strong>EXAMPLE 2 :</strong></p><p><em>INPUT :</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*pLSAxge2fqfdzZqCLWPA5A.jpeg" /></figure><p>Here we are defining the name and returning the values as “Hello, name!” and printing the results.</p><p><em>OUTPUT :</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*rNS2v25ZYIW92sGAvDSSFg.jpeg" /></figure><p><strong>EXAMPLE 3 :</strong></p><p>Finding factorial of a number.</p><p><em>INPUT:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*v1nyez9e1nk5GFe7nlMqDA.jpeg" /></figure><p><em>OUTPUT:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/130/1*J9yiPQpCvteY4HjEb_rbYg.jpeg" /></figure><p><strong>A FEW USES OF FUNCTIONS IN PYTHON :</strong></p><p>1] Code Reusability: We can reuse the code if not we can propose “del” command in the last line of the syntax.</p><p>2] Mathematical Calculations: We can do mathematical calculations like addition, subtraction, multiplication, etc. using Functions.</p><p>3] Event Handling: Functions are used to handle events in web applications, making the code clean and organized.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8bcfb00ada71" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>