<?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 Himabinduvelpula on Medium]]></title>
        <description><![CDATA[Stories by Himabinduvelpula on Medium]]></description>
        <link>https://medium.com/@himabinduvelpula85?source=rss-f94694791455------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*SymxIkaS4F3MzhHM</url>
            <title>Stories by Himabinduvelpula on Medium</title>
            <link>https://medium.com/@himabinduvelpula85?source=rss-f94694791455------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 11:45:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@himabinduvelpula85/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[Python Syntax]]></title>
            <link>https://medium.com/@himabinduvelpula85/python-syntax-ef29c70928b6?source=rss-f94694791455------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef29c70928b6</guid>
            <category><![CDATA[python-syntax]]></category>
            <dc:creator><![CDATA[Himabinduvelpula]]></dc:creator>
            <pubDate>Sat, 21 Nov 2026 17:03:51 GMT</pubDate>
            <atom:updated>2026-11-21T17:03:51.698Z</atom:updated>
            <content:encoded><![CDATA[<p>Python is also a Programming Language if we want to learn a Python language, first we need to learn all the rules provided by the python those rules are called Python Syntax.</p><p>→ Python syntax refers to a set of rules we must follow while writing Python code.</p><p>→ <strong>Basic Python syntax:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hl_LkI2RzOL0HhUXvp1byA.png" /></figure><p><strong>Print()</strong> is a built-in function used to display the output.</p><p><strong>Hello, World!</strong> is a string.</p><p><strong>() Parentheses are</strong> used to pass the value to the print function.</p><p><strong>→ Statement:</strong> Any instruction that a python engine can execute during execution it can give with an error (or) without an error if it able to execute that instructions is called a statement.</p><p><strong>Example: Without an error</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wgu2D_bjWf5n-YpGfO9C6w.png" /></figure><p><strong>Example: With an error</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BpOVfDlvTV2ZW_sFsxDJAQ.png" /><figcaption>Name Error: name ‘x’ is not defined</figcaption></figure><p><strong>→ </strong>Whenever we are going to write a statement we need to follow three rules:</p><p><strong>First Rule</strong></p><ol><li><strong>Single Statement in Single line :- </strong>Single Statement in single line: If we write only one statement in a single line it is called single statement in a single line.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*SuDvuIs7-9HbA7wPAdke5g.png" /></figure><p><strong>→</strong> Don’t write multiple statements in a single line. If we write multiple statements in a single line, then we get an error; the error is called a syntax error.</p><p><strong>→ Syntax Error: </strong>A<strong> </strong>syntax error<strong> </strong>is also called a compile-time error, which means that whenever we don’t follow Python rules, it gives a syntax error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b0AwJAj3jRJHSItblvC4Tg.png" /></figure><p><strong>→</strong> Here, I have written two statements in a single line; if I click the run button, the entire code is given to the Python engine. python engine will gives to the syntax checker and syntax checker stops and says to follow first rule.</p><p><strong>→</strong> Always preferred to write in a single statement on a single line.</p><p><strong>→</strong> We can correct this error by writing the statement on a new line</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*5fTnK40Q0m4VtVpftabNYQ.png" /></figure><p><strong>2nd Rule</strong></p><p><strong>2. Multiple Statements in Single Line:- </strong>If we write more than one statement in a single line, it is called as Multiple Statement in Single line.</p><p><strong>→</strong> If we want to write multiple statements in a single line, use a symbol called a semicolon ( ; ). In between the statements, use a semicolon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*rJFVg0_rUJZ-FwZzlV4p6w.png" /><figcaption><strong>Semi colon ; </strong>is used to separate multiple statements in one line</figcaption></figure><p><strong>→</strong> Dont use this rule because it can reduce code readability.</p><p><strong>3rd Rule</strong></p><p><strong>Single Statement in Multiple Lines:- I</strong>f we want to write a single statement in multiple lines, it is called a single statement in multiple lines.</p><p><strong>→</strong> To follow the 3rd rule use a symbol backslash \ (or) ( ) — Parentheses. Wherever you want to break a line and continue to the next line.</p><p><strong>Using backslash \ :-</strong></p><p>Example:- 2+2–5+6</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xo-RYYlMZFmxU13VQqSNMw.png" /><figcaption>Backslash allows us to break a single statement into multiple lines</figcaption></figure><p><strong>Using Parentheses ( ) :-</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WvdJom0HPTY2_OZ_LnVjMQ.png" /><figcaption>Parentheses allows us to break a single statement into multiple lines</figcaption></figure><p><strong>→</strong> But never use backslash at the end because if we use this python thinks that this line also has something is present.</p><p><strong>→</strong> If we use a backslash at the end, we get a syntax error called Incomplete Input Error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ANEVvSs4RUAEHpmm2z1cig.png" /></figure><p><strong>4th Rule</strong></p><p><strong>Comments:</strong> Comments can be used to explain Python code. Comments start with #, and Python will ignore them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JAlwlORdtdn_KTOswqu6sA.png" /></figure><p><strong>Use of comments :</strong> Comments make the code more readable, which will help us to debug the error very easily.</p><p><strong>Statement</strong></p><p><strong>Example Of Statement :- </strong>This is a statement because python excutes the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WnpHJg9umSJhs88BtXWm5A.png" /></figure><p><strong>Example Of Comment:-</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*0TtC0XObujsCazjfiht8BA.png" /></figure><p><strong>→</strong> This is a comment because python ignores it during the execution.</p><p><strong>Statement and Comment in Single line:-</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*UJl-487HWPPpzjH-1OfltQ.png" /></figure><p><strong>→</strong> Before the hash, Python thinks the code as statement.</p><p><strong>→</strong> After the hash symbol, Python thinks the code as a comment.</p><p><strong>→</strong> Comments are mainly used to explain the code within the program so that the programmer can easily understand.</p><p><strong>Types of Comments in Python. There are Two Types:-</strong></p><p><strong>1. Single Line Comment</strong></p><p><strong>2. Multi-Line Comment</strong></p><ol><li><strong>Single Line Comment :-</strong> A comment is written in single line using the hash symbol # is called as single line comment.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WhfjF5M2HVfuhw7TeErkPQ.png" /><figcaption># hash is used as a single line comment and as well as multiple time as mutliline comment</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YEjz6H8is7t4YOF8Dz0iDQ.png" /><figcaption>Multiple time as a multi-line comment</figcaption></figure><p><strong>5th Rule</strong></p><p><strong>Keywords:-</strong> Keywords are reserved words which have a special meaning in the Python engine; these are called as keywords. There are 35 keywords.</p><p><strong>RAM: </strong>RAM is a temporary storage unit where we can store data. It is the hardware present in a machine where we can store data.</p><p>→ Data is created and stored in RAM.</p><p>→ It stores data temporarily.</p><p>→ When we turn off the computer, the data stored in the RAM will be lost.</p><p>→ RAM is memory that contains small cells called as memory cells; inside the cell, we store the data.</p><p>→ Every memory cell will have its own address</p><p><strong>Example : x = 20</strong></p><p>→ When we click the Run button, the Python engine creates 20 and stores it in RAM.</p><p><strong>Example : var1 = 20</strong></p><p>→ When we click the Run button, Python first checks whether the data 20 is there or not. If the data is not there it will create the data and store in that data randomly inside the memory.</p><p>→ But the problem is that memory has huge addresses that we can’t access, so we give the address a temporary name.</p><p>→ So Python creates a variable name var1 = 20. var1 → goes to check whether any memory has a temporary name called var1.</p><p>→ If not there it create a variable called var1 with the help of assignment operator. This var1 will be assigned to this particular location. This is how a variable works.</p><p>→If we going to write <strong>var2 = 20</strong> → Run → Python creates 20.</p><p>→ It creates another variable name called var2, which is a temporary name for any memory location, so it will create a var2, and var2 will be assigned again to the same location.</p><p>→ A single location can have n number of temporary name.</p><p>→ var1 and var2 are two temporary names pointing to the same memory location</p><p>. var3 = 100</p><p>Python creates 100 and store 100 randomly in RAM. It creates a variable name called var3. It checks whether any memory has a temp name called var3. If it’s not there, it creates a var3 and assigns 100.</p><p>var4 = 100</p><p>var1 = 10</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ryWV8Sw6jZ4UvTocsfvVjQ.png" /></figure><p>Example : var1 = 10</p><p>var2 = 20</p><p>var3 = 20</p><p>var4 = 10</p><p>var1 = 20</p><p>var4 = 200</p><p>var5 = 30</p><p>var6 = 200</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pABWcTpp76H9OZOy4s-R_A.png" /></figure><p><strong>6th Rule</strong></p><p><strong>Variable: </strong>In Python, a variable is created when you assign a value to it. We create a variable by assigning a value to it using the = operator. A variable is a Temporary name given to a memory location.</p><p>→ Because in any programming language we can’t access the memory at the actual address. So, we require a technique called a variable.</p><p>→ Without a variable, we can create and store data, but we can’t access it easily.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*rCx5NFHA1m_iAvre1rPsDA.png" /></figure><p>Variable -&gt; name</p><p>Variable name → name</p><p>= → Assignment Operator</p><p>Value → ‘Bindu’</p><p><strong>Variable Name: </strong>A variable is the temporary name given to a memory location<strong>. </strong>In Python, variables are used to store Python data. In Python, variables are created when you assign a value to them.</p><p><strong>→</strong> Variable names usually use snake case.</p><p><strong>→</strong> In any Programming language, we can’t access memory by its actual address. So, we require a technique called a variable.</p><p><strong>→</strong> Without a variable, we can store data but can’t access.</p><p>Example: first_name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*7v4Wd6UA4_rXspS2vVj7ig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pzlwPZBVWE1WCO3T0CnhlA.png" /><figcaption>my_first_variable is a variable name</figcaption></figure><p>Python uses = to assign a value to the variable.</p><p>→<strong> Naming Convention: </strong>Naming Convention is a set of Python rules that a Python program has to follow whenever they want to create a variable name.</p><p><strong>→</strong> If we don’t follow this rule, we get a syntax error.</p><p><strong>Syntax:-</strong></p><ol><li><strong>my_first = ‘Hello world!’ — str</strong></li><li><strong>_Second_Variable = 42 — int</strong></li><li><strong>Valid_variable_name_3 = 3.14</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJZg9KGK6rKwZACtfs1eIw.png" /></figure><p><strong>When to use a variable?</strong></p><p>Whenever we want to reuse data repeatedly, we use a variable.</p><p><strong>Naming Rules :</strong></p><ol><li>A variable name must start with a letter, a number, or an underscore. Can contain alphabets</li></ol><p>Example:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rhDoTtHt0IZJ2lNM0knHoA.png" /></figure><p>2. Should not contain special characters or spaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WP6xWKj3-9_DKn3mJKwZ3w.png" /></figure><p>3. Should not start with numbers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SxvAObWo7LIzunfsertTVA.png" /></figure><p>4. Should not be a reserved keyword in Python.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*56dHSXe73otyai7T4RWsUw.png" /></figure><p>5. Variable names are case-sensitive; age,Age and AGE are three different variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*DyR3NK_xTxPzg3BjsdAyEQ.png" /></figure><p><strong>Function: </strong>A function is a block of reusable code that performs a specific task whenever we call it.</p><ol><li><strong>id( ):</strong> This is a built-in function using which we can get the actual memory address.</li></ol><p><strong>→ </strong>( ) — inside parentheses, we can provide a variable name or data value.</p><p><strong>#Case 1:</strong></p><p>x = 20</p><p>y = 20</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OjT8X69o7ZU3W7Klf_nGAQ.png" /></figure><p><strong>→</strong> x and y are two different variable names referring to the same integer 20.</p><p><strong>→</strong> x and y are pointing to the same memory location.</p><p><strong>→ </strong>x and y have the same id</p><p><strong># Case 2:</strong></p><p>x = 20</p><p>x = 30</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*GszfZHNh6yo5McEodT-iFw.png" /></figure><p><strong># Case 3:</strong></p><p>x1 = 20</p><p>x2 = 30</p><p>x3 = 40</p><p>x2 = 10</p><p>x1 = 30</p><p>x5 = 60</p><p>x6 = 70</p><p>x3 = 60</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dXq2_sW3roDE-NmRuf4-Kg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nj77_0LY8WcBfiGpsGPffg.png" /></figure><p><strong>Datatypes:</strong> Datatypes are the different types of data that we can create and use in Python.</p><p>→ In python we will be having different types of data where every type will be having their own property/character. This data belongs to a particular type then the type is called data type.</p><p>→ Python data types are categorised into different groups</p><p>(Non-sequential) It is not a data type. It is a group name where, inside the numeric group, Python has three types of data.</p><p>1.Numeric:-</p><p><strong>→ Integer ( int )</strong></p><p><strong>→ Float ( float )</strong></p><p><strong>→ Complex (complex)</strong></p><p><strong>2. Boolean (Boolean)</strong></p><p><strong>→ Integer:</strong> An integer is a Python data type that we can create any real values from -∞ to +∞</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*uTgxsHAI9A_YDWQSHwlceQ.png" /></figure><p><strong>→ Float:</strong> An integer is a Python data type that we can create numbers with decimal points from -∞ to +∞</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0gsBmyM7_EhJcBMqbJgBVg.png" /></figure><p>→ When creating a float data type, Python is precise up to 16 decimal places. After 16 decimal places, if we create larger float values, Python will do something called approximation. It rounds to the nearest value.</p><p><strong>→ Complex:</strong> Complex is a Python data type by using which we can create a data called complex. A complex number has two parts:</p><p>→ Real Part: an int/float</p><p>→ Imaginary</p><p>→ Because of the imaginary part we call it as complex.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*uyxdjjRcJObrchbWxckbqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_9vaUM_BhQXidwIaQRkkOQ.png" /></figure><p><strong>Rule 6 :</strong></p><ol><li>Whenever you create an imaginary part, it should be created with j or J; otherwise, we get a NameError.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*INE65VSIkLhsnrl-w5vcjw.png" /></figure><p>→ If, in front of this j or J, we do not have a number (int or float), if it is not there we will not be called a complex.</p><p>These three belong to a group called the Numeric group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FslmFhYXc3LgDQ_eoEPycw.png" /></figure><p><strong>2Sequential Group :</strong></p><ol><li>Text</li></ol><p>→ String</p><p>2. set</p><p>→ set</p><p>→ Frozenset</p><p>3. Dictionary</p><p>→ Dict</p><p>4. list</p><p>5. Tuple</p><p>6. range</p><p><strong>Interning:-</strong> Interning is a technique used by the Python engine by which the Python engine automatically allocates small memory in RAM, and this small memory is called cache.</p><p>→ Not every Python data type supports interning.</p><p>→ Some Python data types support interning.</p><p><strong>→ Integer Interning:-</strong> Whenever we working with integer data internally python automatically allocates memory inside this memory python will store values -5 to -256.</p><p>→ Whenever I use an integer, for example, x = 10, Python may reuse an already existing integer.</p><p>→ At that time, the integer in RAM is going to occupy a small memory, and inside the memory, it is going to store the value -5 to -256.</p><p>→ This is done automatically done by Python. Whenever we working with integer this concept is called as integer interning.</p><p><strong>Example:-</strong></p><p>x = 20</p><p>y = 20</p><p>id(x)</p><p>id(y)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MlKC5DnxWWBpWrIMNmO6oA.png" /></figure><p>→ Both will have the same ID because Python reuses the integer.</p><p>supports interning</p><p>a = 267</p><p>b =267</p><p>id(a)</p><p>id(b)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qad9l-OpLhZ7b26yA-Aoig.png" /></figure><p>x1 = -4</p><p>x2 = -4</p><p>id(x1)</p><p>id(x2)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*STkbXGfkmYDYWKMKR6tiVQ.png" /></figure><p>x1 = -5</p><p>x2 = -5</p><p>id(x1)</p><p>id(x2)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xKvutzlepkt7Nn9J-P-tzg.png" /></figure><p><strong>2. Floats don&#39;t support interning</strong></p><p>Example: x1 = 0.0</p><p>x2 = 0.0</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ShN1EevIcFo2oHvnJIX4Pg.png" /></figure><p>→ Whenever we create x1 = 0.0, it goes into RAM and checks if 0.0 is there. If not creates new memory, stores 0.0, and creates a variable called x1, and tells x1 your reference to this location.</p><p>→ Again, it sees 0.0, but because it knows that 0.0 belongs to float. float doesn&#39;t support interning; it will automatically create new memory again</p><p><strong>3. Complex: It is impossible to support interning.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G24lXu712-h86gMukIERaQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef29c70928b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PYTHON]]></title>
            <link>https://medium.com/@himabinduvelpula85/python-5e361d05fec1?source=rss-f94694791455------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e361d05fec1</guid>
            <category><![CDATA[python-engine]]></category>
            <dc:creator><![CDATA[Himabinduvelpula]]></dc:creator>
            <pubDate>Mon, 16 Nov 2026 12:43:40 GMT</pubDate>
            <atom:updated>2026-11-16T12:43:40.848Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Python: </strong>Python is a high-level, interpreted, general-purpose programming language. Guido van Rossum created it and released it in 1991. Python is simple and easy to learn</p><p><strong>Other Definition:</strong> Python is a Programming Language used to write a set of instructions that machines can understand and follow.</p><p>→ Python executes the instructions and displays the output.</p><p>→ Print function is used to display the message welcome to programming language on the screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G5RMpBGXe4z8PKWK0qGB2Q.png" /></figure><p><strong>→ Purpose: </strong>To write a set of instructions and give them to a machine so that the machine can follow them and communicate with us.</p><p><strong>→ Programmer:</strong> A person who writes a program is called a programmer.</p><p><strong>→ Program:</strong> A set of instructions given to a computer.</p><p><strong>→ Programming:</strong> Writing a set of instructions by human beings to tell a machine what to do.</p><p><strong>→ Programming Language :</strong> is a language used by the programmers to write instructions and comminicate with machines.</p><p>→ We cannot directly give a set of instructions to a machine because a machine understands only machine language (binary language 0s and 1s).</p><p>→ Machines don&#39;t understand the English language. To convert our program into a language that a machine can understand, we use translators. There are two types of translators:</p><p>Python uses both a compiler and an interpreter</p><ol><li><strong>Compiler:</strong> A compiler will convert source code into bytecode</li><li><strong>Interpreter:</strong> An interpreter can execute the bytecode and produce the output</li></ol><blockquote><strong><em>Compiler: </em></strong><em>A compiler is a translator that converts a program written in a high-level language to machine language (or) low-level language.</em></blockquote><p><strong>Interpreter:</strong> An interpreter is a translator that converts and executes a program written in a high-level language at runtime at a time.</p><p><strong>Why Python?</strong></p><ol><li><strong>Simple and Easy to learn:</strong> Easy to learn even for someone who doesn&#39;t have any prior programming knowledge. Python has simple syntax similar to the English Language, making it easy to read, write and understand.</li><li><strong>Huge library:</strong> Python has a huge library compared with other programming languages like C, C++, and Java.</li><li><strong>Wide range of applications:</strong> Python is used in data science, Artificial Intelligence and Machine learning.</li></ol><p><strong>Key Features:</strong></p><ol><li>Easy to learn and use: simple and readable syntax</li><li>Readable and clean syntax</li><li>Object-oriented: supports classes and objects</li><li>open-source</li></ol><p><strong>Applications:</strong></p><ol><li>Web Development</li><li>Data science &amp; Machine Learning</li><li>Artificial Intelligence</li></ol><h3><strong>Python Engine</strong></h3><p><strong>Python Engine: </strong>The Python engine is a component that can understand and execute programs written in the Python Programming language.</p><p><strong>How does the Python engine work?</strong></p><p>→ First we will write the source code using python programming language.</p><p>→ when we click on run button the python engine receives the source code</p><p>→ If there was no error then they will be given to compiler.</p><p>→ Compiler will convert the source code into bytecode</p><p>→ Then the byte code is given to <strong>PVM Python Virtual Machine </strong>which will executes the byte code, based on the instructions the computer performs the tasks and gives the output.</p><p>→ When the entire python engine is running the python engine has two types of error</p><ol><li><strong>Syntax Error</strong></li><li><strong>Exception Error</strong></li></ol><p><strong>Source Code: </strong>The set of instructions written using the Python programming language is called source code. After writing the source code, if we click the Run button, it gives the instructions to the machine.</p><p>→ The main duty of the Python engine is to execute the source code and check whether the program follows Python syntax rules or not.</p><p><strong>Syntax Checker: </strong>Whenever Python receives the source code, the entire source code is given to a thing called the Syntax Checker.</p><p><strong>→ </strong>The syntax checker&#39;s duty is to check every line by line whether the programming is following Python syntax or not.</p><p>→ If it doesn&#39;t, follows it will give us a <strong>Syntax Error.</strong></p><p>→ If we are following all the rules and the syntax checker didn’t find any single error, then the entire source code is given to the compiler.</p><p>→ The C<strong>ompiler</strong> will convert the source code into bytecode.</p><p><strong>→ Syntax Error: </strong>A<strong> </strong>syntax error<strong> </strong>is also called a compile-time error, which means that whenever we don’t follow Python rules, it gives a syntax error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m2CTmsJ-YoEK2eFoBrnM9A.png" /></figure><p><strong>→ Compile-time error: </strong>whenever a programmer makes a syntax mistake, we get a compile-time error, also called as a syntax error.</p><p><strong>Exception </strong>: Exception is also called a runtime error Whenever an interpreter is converting bytecode into low-level code here we also getting an error called an exception.</p><p><strong>Interpreter</strong> : The python virtual machine excutes the bytecode and produces the output.</p><p><strong>Why does an exception happen?</strong></p><p>→ Whenever we Programmer do a logical mistake that error is called as error exception.</p><p>→ Because of programmers’ logical mistakes, exceptions happen.</p><p><strong>Runtime error:</strong> Whenever the Python engine tries to convert the bytecode into low-level code by the conversion if we get an error that error is called as runtime error also called as a exception error.</p><p><strong>Type error:</strong> A type error is a exception that occurs during the program execution.</p><p><strong>Example:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GOmi4SoROxyw-98KcBlCuw.png" /></figure><p><strong>Zero Divison Error:</strong> It occurs when we try to divide by zero.</p><p>Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KbeT0zhLhS1nOdOYVrRLNA.png" /></figure><p><strong>Working of Python Engine :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_0xmqZ1PBO46hnU9bczDFw.jpeg" /></figure><p>→ First we will write the source code using python programming language.</p><p>→ when we click on run button the python engine receives the source code</p><p>→ If there was no error then they will be given to compiler.</p><p>→ Compiler will convert the source code into bytecode</p><p>→ Then the byte code is given to <strong>PVM Python Virtual Machine </strong>which will executes the byte code, based on the instructions the computer performs the tasks and gives the output.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e361d05fec1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>