<?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 Minhajrafeeq on Medium]]></title>
        <description><![CDATA[Stories by Minhajrafeeq on Medium]]></description>
        <link>https://medium.com/@minhajrafeeq7?source=rss-c409220db37a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*yBN1CILqYS8dLrokKKqvPg.png</url>
            <title>Stories by Minhajrafeeq on Medium</title>
            <link>https://medium.com/@minhajrafeeq7?source=rss-c409220db37a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:31:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@minhajrafeeq7/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[Using the standard library (math, random, etc.)]]></title>
            <link>https://medium.com/@minhajrafeeq7/using-the-standard-library-math-random-etc-e22829a5e550?source=rss-c409220db37a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e22829a5e550</guid>
            <category><![CDATA[python-web-developer]]></category>
            <category><![CDATA[math-in-python]]></category>
            <category><![CDATA[random-in-python]]></category>
            <category><![CDATA[standard-library]]></category>
            <category><![CDATA[beginner-coding]]></category>
            <dc:creator><![CDATA[Minhajrafeeq]]></dc:creator>
            <pubDate>Wed, 15 Feb 2023 10:01:27 GMT</pubDate>
            <atom:updated>2023-02-15T10:01:27.311Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Using the standard library (math, random, etc.)" src="https://cdn-images-1.medium.com/max/1024/1*QQrcPjDWmrDi2ZytbJW-mA.jpeg" /></figure><p>The Python Standard Library is a collection of modules that provide a wide range of functionality, including file I/O, regular expressions, data types, and algorithms. In this blog, we will explore how to use the Standard Library in Python to enhance your applications and make your life as a programmer easier.</p><p>What is the Python Standard Library?</p><p>The Python Standard Library is a collection of modules that are included with every Python installation. These modules provide a wide range of functionality, including file I/O, regular expressions, data types, and algorithms. The Standard Library is a great resource for Python programmers, as it provides a wealth of pre-built functionality that can be used to enhance your applications.</p><p>File I/O</p><p>The Standard Library provides a number of modules for performing file I/O, including the os and shutil modules. The os module provides a range of functionality for working with the file system, including creating, renaming, and deleting files and directories. The shutil module provides a range of functionality for copying and moving files and directories.</p><p>Regular Expressions</p><p>The Standard Library provides a module called re for working with regular expressions. Regular expressions are a powerful tool for pattern matching and string manipulation, and the re module provides a range of functions for working with regular expressions in Python.</p><p>Data Types</p><p>The Standard Library provides a number of modules for working with data types, including the collections and heapq modules. The collections module provides a range of specialized data types, such as deques, defaultdicts, and namedtuples, that can be used to simplify your code and improve performance. The heapq module provides functions for working with heaps, which are data structures that allow you to efficiently find and retrieve the smallest element in a collection.</p><p>Algorithms</p><p>The Standard Library provides a number of modules for working with algorithms, including the itertools and functools modules. The itertools module provides a range of functions for working with iterators, including functions for combining, filtering, and transforming iterators. The functools module provides a range of higher-order functions, such as reduce, for working with functions and functional programming.</p><p>Conclusion</p><p>The Python Standard Library is a great resource for Python programmers, as it provides a wealth of pre-built functionality that can be used to enhance your applications. In this blog, we have explored some of the key modules in the Standard Library, including the modules for file I/O, regular expressions, data types, and algorithms. By using the Standard Library in Python, you can simplify your code, improve performance, and take advantage of the many powerful tools and algorithms that are available.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e22829a5e550" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Object-Oriented Programming (OOP) in Python: A Guide]]></title>
            <link>https://medium.com/@minhajrafeeq7/object-oriented-programming-oop-in-python-a-guide-df29a527bef4?source=rss-c409220db37a------2</link>
            <guid isPermaLink="false">https://medium.com/p/df29a527bef4</guid>
            <category><![CDATA[beginner-coding]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[oop-concepts]]></category>
            <category><![CDATA[oop-python]]></category>
            <category><![CDATA[python-web-developer]]></category>
            <dc:creator><![CDATA[Minhajrafeeq]]></dc:creator>
            <pubDate>Tue, 14 Feb 2023 09:52:34 GMT</pubDate>
            <atom:updated>2023-02-14T09:52:34.156Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Object-Oriented Programming (OOP) in Python: A Guide" src="https://cdn-images-1.medium.com/max/1024/1*z2jougtOCmQvAxZwFXANew.jpeg" /></figure><p>Object-Oriented Programming (OOP) is a popular programming paradigm that is widely used in software development. In this blog, we will explore the basics of OOP in Python and how it can be used to write more organized, maintainable, and scalable code.</p><p>What is Object-Oriented Programming?</p><p>OOP is a programming paradigm that models software as objects, rather than as a sequence of procedures. In OOP, objects represent real-world entities and the methods associated with the objects represent actions that can be performed on those entities.</p><p>Classes and Objects in Python</p><p>In Python, a class is a blueprint for creating objects. Objects are instances of classes and they can inherit the attributes and behaviors defined in the class. The class definition contains the attributes (data) and the methods (functions) associated with the objects.</p><p>Encapsulation in Python</p><p>Encapsulation is the technique of hiding the internal details of an object and exposing only the necessary information to the outside world. In Python, encapsulation is achieved by declaring instance variables as private and providing public access methods to access or modify the values of the instance variables.</p><p>Inheritance in Python</p><p>Inheritance is the mechanism that allows one class to inherit the attributes and behaviors of another class. Inheritance allows you to create a new class that is a modified version of an existing class, without having to rewrite all the code from scratch.</p><p>Polymorphism in Python</p><p>Polymorphism is the ability of an object to take on multiple forms. In Python, polymorphism can be achieved through function overloading and method overriding. Function overloading allows multiple functions with the same name to be defined, each with a different number of arguments or types of arguments. Method overriding allows a subclass to provide a different implementation of a method defined in its superclass.</p><p>Conclusion</p><p>In this blog, we have explored the basics of Object-Oriented Programming in Python. We have seen how classes and objects can be used to model real-world entities, how encapsulation and inheritance can be used to write more organized, maintainable, and scalable code, and how polymorphism can be used to create flexible and reusable code. By using OOP in Python, you can write more structured, maintainable, and scalable code, and you can create reusable and extensible software that can grow with your needs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df29a527bef4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reading and Writing Files in Python]]></title>
            <link>https://medium.com/@minhajrafeeq7/reading-and-writing-files-in-python-e438812125d4?source=rss-c409220db37a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e438812125d4</guid>
            <category><![CDATA[beginner-coding]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[python-web-developer]]></category>
            <category><![CDATA[python-beginner]]></category>
            <category><![CDATA[files-in-python]]></category>
            <dc:creator><![CDATA[Minhajrafeeq]]></dc:creator>
            <pubDate>Mon, 13 Feb 2023 09:56:52 GMT</pubDate>
            <atom:updated>2023-02-13T09:56:52.949Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Reading and Writing Files in Python" src="https://cdn-images-1.medium.com/max/1024/1*NYiPPnL3prOEAfD_iPv0fw.jpeg" /></figure><p>In Python, reading and writing files is an important aspect of working with data. Whether you need to read a text file, write data to a CSV file, or perform more complex file operations, Python provides a simple and flexible way to accomplish these tasks.</p><p>To read a text file in Python, you can use the open function. The open function returns a file object, which you can then use to read the contents of the file. For example:</p><pre>file = open(&quot;example.txt&quot;, &quot;r&quot;)<br>contents = file.read()<br>print(contents)<br>file.close()</pre><p>Output:</p><pre>This is an example text file.</pre><p>In the example above, &quot;example.txt&quot; is the name of the file you want to open, and &quot;r&quot; is the mode, which stands for read. There are several other modes you can use, including &quot;w&quot; for write, &quot;a&quot; for append, and &quot;x&quot; for exclusive creation.</p><p>To write data to a file, you can use the write method. For example:</p><pre>file = open(&quot;example.txt&quot;, &quot;w&quot;)<br>file.write(&quot;This is an updated example text file.&quot;)<br>file.close()</pre><p>In the example above, the contents of the file &quot;example.txt&quot; are overwritten with the string &quot;This is an updated example text file.&quot;.</p><p>For reading and writing CSV files, you can use the csv module. The csv module provides a convenient way to read and write CSV files, allowing you to work with the data as lists and dictionaries.</p><p>For example, to read a CSV file:</p><pre>import csv<br><br> with open(&quot;example.csv&quot;, &quot;r&quot;) as file:<br>    reader = csv.reader(file)<br>    for row in reader:<br>        print(row)</pre><p>Output:</p><pre>[&#39;Name&#39;, &#39;Age&#39;, &#39;Occupation&#39;]<br>[&#39;John Doe&#39;, &#39;35&#39;, &#39;Engineer&#39;]<br>[&#39;Jane Doe&#39;, &#39;30&#39;, &#39;Doctor&#39;]</pre><p>And to write a CSV file:</p><pre>import csv<br><br> data = [[&quot;Name&quot;, &quot;Age&quot;, &quot;Occupation&quot;],<br>        [&quot;John Doe&quot;, &quot;35&quot;, &quot;Engineer&quot;],<br>        [&quot;Jane Doe&quot;, &quot;30&quot;, &quot;Doctor&quot;]]<br><br> with open(&quot;example.csv&quot;, &quot;w&quot;, newline=&quot;&quot;) as file:<br>     writer = csv.writer(file)<br>     writer.writerows(data)</pre><p>In conclusion, reading and writing files is an essential aspect of working with data in Python. Whether you need to read a text file, write data to a CSV file, or perform more complex file operations, Python provides a simple and flexible way to accomplish these tasks. With the open function and the csv module, you can easily read and write files, making it easier to work with data in your programs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e438812125d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Importing Modules and Working with External Libraries in Python]]></title>
            <link>https://medium.com/@minhajrafeeq7/importing-modules-and-working-with-external-libraries-in-python-715a67204d38?source=rss-c409220db37a------2</link>
            <guid isPermaLink="false">https://medium.com/p/715a67204d38</guid>
            <category><![CDATA[beginner-coding]]></category>
            <category><![CDATA[external-libraries]]></category>
            <category><![CDATA[python-web-developer]]></category>
            <category><![CDATA[modules]]></category>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Minhajrafeeq]]></dc:creator>
            <pubDate>Sun, 12 Feb 2023 09:46:33 GMT</pubDate>
            <atom:updated>2023-02-12T09:46:33.217Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Importing Modules and Working with External Libraries in Python" src="https://cdn-images-1.medium.com/max/1024/1*IyErecM4cyjW8qR93isRJQ.jpeg" /></figure><p>In Python, modules are files that contain definitions and statements. Modules can be imported into other modules or into the main program to provide additional functionality. By using modules, you can reuse code across multiple projects and avoid duplicating effort.</p><p>To import a module in Python, you use the import statement, followed by the name of the module. Once the module is imported, you can access its functions, classes, and variables using the dot notation.</p><p>For example, to import the math module and use its sqrt function:</p><pre>import math<br>result = math.sqrt(16)<br>print(result)</pre><p>Output:</p><pre>4.0</pre><p>External libraries, also known as third-party libraries, are collections of modules that are not part of the Python standard library. These libraries provide additional functionality that is not included in the standard library, such as machine learning algorithms, web frameworks, and more.</p><p>To install an external library, you can use a package manager such as pip. For example, to install the numpy library, you can run the following command in your terminal or command prompt:</p><pre>pip install numpy</pre><p>Once the library is installed, you can import it into your program using the import statement, just like with built-in modules.</p><p>For example:</p><pre>import numpy as np<br>a = np.array([1, 2, 3])<br>print(a)</pre><p>Output:</p><pre>[1 2 3]</pre><p>In conclusion, modules and external libraries are a crucial part of programming in Python. By using modules, you can reuse code and keep your programs organized. External libraries provide additional functionality that is not included in the standard library, allowing you to perform complex tasks with ease.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=715a67204d38" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lists, Tuples, and Dictionaries in Python]]></title>
            <link>https://medium.com/@minhajrafeeq7/lists-tuples-and-dictionaries-in-python-24feb62638ba?source=rss-c409220db37a------2</link>
            <guid isPermaLink="false">https://medium.com/p/24feb62638ba</guid>
            <category><![CDATA[lists-in-python]]></category>
            <category><![CDATA[beginner-coding]]></category>
            <category><![CDATA[tuples]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[dictionaries-in-python]]></category>
            <dc:creator><![CDATA[Minhajrafeeq]]></dc:creator>
            <pubDate>Sat, 11 Feb 2023 10:06:01 GMT</pubDate>
            <atom:updated>2023-02-11T10:06:01.007Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PFA7N8uNvIF1oUz9rNPMPw.jpeg" /></figure><p>In Python, lists, tuples, and dictionaries are used to store collections of data. These data structures provide a way to organize and manipulate data in your code.</p><p>Lists: A list is a collection of values, which can be of any type, and is ordered and changeable. Lists are declared using square brackets, and items are separated by commas.</p><p>For example:</p><p>fruits = [‘apple’, ‘banana’, ‘cherry’]</p><p>Lists have many useful methods and operations, such as adding and removing items, sorting, reversing, and more.</p><p>Tuples: A tuple is similar to a list, but is immutable, meaning that its values cannot be changed after it is created. Tuples are declared using parentheses, and items are separated by commas.</p><p>For example:</p><p>fruits = (‘apple’, ‘banana’, ‘cherry’)</p><p>Tuples are often used to return multiple values from a function, as they are immutable and thus safer to use than lists.</p><p>Dictionaries: A dictionary is a collection of key-value pairs, where each key is unique and maps to a specific value. Dictionaries are declared using curly braces, and items are separated by colons.</p><p>For example:</p><p>person = {‘name’: ‘John Doe’, ‘age’: 30, ‘country’: ‘USA’}</p><p>Dictionaries are often used to store configuration settings, and can be used to perform lookups based on keys.</p><p>In conclusion, lists, tuples, and dictionaries are essential data structures in Python that provide a way to store collections of data. They each have their own strengths and weaknesses, and should be chosen based on the specific requirements of the task at hand. Whether you need an ordered, changeable collection, an immutable collection, or a collection of key-value pairs, Python provides a data structure to suit your needs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24feb62638ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Handling Errors and Exceptions in Python]]></title>
            <link>https://medium.com/@minhajrafeeq7/handling-errors-and-exceptions-in-python-2320c11b3f48?source=rss-c409220db37a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2320c11b3f48</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[error-handling]]></category>
            <category><![CDATA[exception-handling]]></category>
            <dc:creator><![CDATA[Minhajrafeeq]]></dc:creator>
            <pubDate>Fri, 10 Feb 2023 10:01:33 GMT</pubDate>
            <atom:updated>2023-02-10T10:01:33.789Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Handling Errors and Exceptions in PythonHandling Errors and Exceptions in Python" src="https://cdn-images-1.medium.com/max/1024/1*cA7fqMunkSrJeeTFslQH5A.jpeg" /></figure><p>Errors and exceptions are an inevitable part of programming. They occur when your code encounters a situation it wasn’t designed to handle, such as dividing by zero or trying to access a list item that doesn’t exist.</p><p>In Python, errors and exceptions can be handled using try-except statements. The try block contains the code that you want to test for errors. The except block contains the code that should be executed if an error occurs in the try block.</p><p>The basic syntax for handling errors and exceptions in Python is as follows:</p><p>try:</p><h3>code to be executed</h3><p>except ExceptionType as e:</p><h3>code to be executed if an error occurs</h3><p>For example:</p><p>try: x = 10 / 0 except ZeroDivisionError as e: print(“Cannot divide by zero.”)</p><p>In this example, we are trying to divide 10 by 0, which is not possible. This will raise a ZeroDivisionError exception. In the except block, we catch this exception and print a message indicating that the division by zero is not allowed.</p><p>You can also catch multiple exceptions in the same try-except block by listing them one after the other.</p><p>For example:</p><p>try: x = int(“abc”) except ZeroDivisionError as e: print(“Cannot divide by zero.”) except ValueError as e: print(“Invalid value.”)</p><p>In this example, we are trying to convert the string “abc” to an integer, which is not possible. This will raise a ValueError exception. In the except block, we catch both the ZeroDivisionError and ValueError exceptions, and print a message indicating that the value is invalid.</p><p>It is also possible to catch all exceptions using the bare except clause.</p><p>For example:</p><p>try: x = int(“abc”) except: print(“An error occurred.”)</p><p>In this example, we catch all exceptions using the bare except clause and print a message indicating that an error occurred.</p><p>In conclusion, handling errors and exceptions in Python is an important aspect of writing robust and maintainable code. By using try-except statements, you can catch and handle errors and exceptions, preventing your code from crashing and providing helpful messages to the user.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2320c11b3f48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Functions in Python]]></title>
            <link>https://medium.com/@minhajrafeeq7/functions-in-python-512dad9272eb?source=rss-c409220db37a------2</link>
            <guid isPermaLink="false">https://medium.com/p/512dad9272eb</guid>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[introduction]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[functions-in-python]]></category>
            <category><![CDATA[beginner-coding]]></category>
            <dc:creator><![CDATA[Minhajrafeeq]]></dc:creator>
            <pubDate>Thu, 09 Feb 2023 10:11:03 GMT</pubDate>
            <atom:updated>2023-02-09T10:11:03.415Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dOEa977pAys62JnIlyoO1A.jpeg" /></figure><p>Functions are a fundamental aspect of programming that allow you to encapsulate a block of code into a reusable piece of code. In Python, functions are created using the def keyword followed by the function name, a set of parentheses for arguments, and a colon. The code inside the function must be indented.</p><p>The basic syntax for creating a function in Python is as follows:</p><p>def function_name(arguments):</p><h3>code to be executed</h3><p>For example:</p><p>def say_hello(name): print(“Hello, “ + name)</p><p>In this example, we have created a function called say_hello that takes in one argument, the name of a person, and prints out a greeting.</p><p>Functions in Python can also return a value, which can then be used in other parts of your program. To return a value from a function, you use the return keyword.</p><p>For example:</p><p>def add(a, b): return a + b</p><p>In this example, the add function takes in two arguments, a and b, and returns the sum of these two values.</p><p>Functions in Python can also be assigned to variables, just like any other data type. This allows you to pass a function as an argument to another function, making your code more modular and reusable.</p><p>For example:</p><p>def square(x): return x * x</p><p>def apply(func, x): return func(x)</p><p>result = apply(square, 5) print(result) # 25</p><p>In this example, the square function takes in one argument, x, and returns the square of this value. The apply function takes in two arguments: a function, func, and a value, x, and returns the result of applying the func function to the x value.</p><p>In conclusion, functions are an essential aspect of programming in Python. By creating reusable blocks of code, functions help you write more organized, efficient, and maintainable code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=512dad9272eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Loops (for and while) in Python]]></title>
            <link>https://medium.com/@minhajrafeeq7/loops-for-and-while-in-python-89b9691b451?source=rss-c409220db37a------2</link>
            <guid isPermaLink="false">https://medium.com/p/89b9691b451</guid>
            <category><![CDATA[python-web-developer]]></category>
            <category><![CDATA[beginner-coding]]></category>
            <category><![CDATA[for-loop]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[loops-in-python]]></category>
            <dc:creator><![CDATA[Minhajrafeeq]]></dc:creator>
            <pubDate>Wed, 08 Feb 2023 10:02:44 GMT</pubDate>
            <atom:updated>2023-02-08T10:02:44.114Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Loops (for and while) in Python" src="https://cdn-images-1.medium.com/max/1024/1*ArVDoy_XZtuaVfz_zSJWHg.jpeg" /></figure><p>Loops are an essential aspect of programming that allow you to repeat a certain block of code multiple times. In Python, there are two main types of loops: the for loop and the while loop.</p><p>The for loop allows you to iterate over a sequence, such as a list or range, and execute a block of code for each item in the sequence. The basic syntax for the for loop in Python is as follows:</p><p>for item in sequence:</p><h3>code to be executed for each item in the sequence</h3><p>For example:</p><p>for number in range(10): print(number)</p><p>In this example, the for loop will iterate over the numbers 0 to 9 (inclusive) and print each one.</p><p>The while loop, on the other hand, allows you to repeat a block of code as long as a certain condition is met. The basic syntax for the while loop in Python is as follows:</p><p>while condition:</p><h3>code to be executed while the condition is True</h3><p>For example:</p><p>counter = 0</p><p>while counter &lt; 5: print(counter) counter += 1</p><p>In this example, the while loop will execute the print statement and increment the counter until the counter is no longer less than 5.</p><p>It is important to note that if the condition in the while loop is never met, the loop will run indefinitely, creating an infinite loop. To avoid this, you must ensure that the condition will eventually evaluate to False.</p><p>In conclusion, loops are an important tool for repeating blocks of code in Python. Understanding how to use both the for loop and the while loop will allow you to write more dynamic and efficient programs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89b9691b451" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Conditional Statements (if-else) in Python]]></title>
            <link>https://medium.com/@minhajrafeeq7/conditional-statements-if-else-in-python-2a754dd72059?source=rss-c409220db37a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a754dd72059</guid>
            <category><![CDATA[conditional-statements]]></category>
            <category><![CDATA[if-else-in-python]]></category>
            <category><![CDATA[python-course-online]]></category>
            <category><![CDATA[beginner-coding]]></category>
            <category><![CDATA[if-else]]></category>
            <dc:creator><![CDATA[Minhajrafeeq]]></dc:creator>
            <pubDate>Tue, 07 Feb 2023 10:06:00 GMT</pubDate>
            <atom:updated>2023-02-07T10:06:00.916Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dzxnJ21mSpDzVwOzaG2PdQ.jpeg" /></figure><p>Conditional statements are an important aspect of programming that allow you to control the flow of your code based on certain conditions. In Python, the most commonly used conditional statement is the if-else statement.</p><p>The if-else statement allows you to execute certain code if a certain condition is met and another block of code if the condition is not met. The basic syntax of the if-else statement in Python is as follows:</p><p>if condition:</p><h3>code to be executed if condition is True</h3><p>else:</p><h3>code to be executed if condition is False</h3><p>The condition can be any expression that evaluates to either True or False. For example:</p><p>x = 10</p><p>if x &gt; 5: print(“x is greater than 5”) else: print(“x is less than or equal to 5”)</p><p>In this example, the condition x &gt; 5 is True, so the first print statement is executed.</p><p>You can also use multiple conditions in an if-else statement by using the elif keyword. The elif keyword allows you to specify additional conditions that are checked if the previous conditions are not met. The syntax is as follows:</p><p>if condition1:</p><h3>code to be executed if condition1 is True</h3><p>elif condition2:</p><h3>code to be executed if condition2 is True</h3><p>else:</p><h3>code to be executed if both conditions are False</h3><p>For example:</p><p>x = 10</p><p>if x &gt; 15: print(“x is greater than 15”) elif x &gt; 5: print(“x is greater than 5 but less than or equal to 15”) else: print(“x is less than or equal to 5”)</p><p>In this example, the first condition x &gt; 15 is False, the second condition x &gt; 5 is True, so the second print statement is executed.</p><p>Conclusion</p><p>In conclusion, the if-else statement is an essential tool for controlling the flow of your code in Python. Understanding how to use if-else statements and combining them with conditions and expressions will allow you to write more complex and dynamic programs in Python.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a754dd72059" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Become a pro at Python programming with our guide on Operators and Expressions]]></title>
            <link>https://medium.com/@minhajrafeeq7/become-a-pro-at-python-programming-with-our-guide-on-operators-and-expressions-66f03d7f465f?source=rss-c409220db37a------2</link>
            <guid isPermaLink="false">https://medium.com/p/66f03d7f465f</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[operators-and-expressions]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[pythonpro]]></category>
            <category><![CDATA[beginner-coding]]></category>
            <dc:creator><![CDATA[Minhajrafeeq]]></dc:creator>
            <pubDate>Mon, 06 Feb 2023 09:56:51 GMT</pubDate>
            <atom:updated>2023-02-06T09:56:51.493Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Become a pro at Python programming with our guide on Operators and Expressions" src="https://cdn-images-1.medium.com/max/1024/1*ObreJdDaQrLRwc1f_ht4oA.jpeg" /></figure><p>Operators and expressions are fundamental building blocks of any programming language, including Python. In this blog post, we will go over what operators and expressions are and how to use them in Python.</p><p>Operators</p><p>Operators are symbols that perform specific operations on variables and values in your code. Python supports several types of operators, including:</p><ol><li>Arithmetic Operators: +, -, *, /, % (modulo), // (floor division), ** (exponentiation)</li><li>Comparison Operators: == (equal to), != (not equal to), &gt; (greater than), &lt; (less than), &gt;= (greater than or equal to), &lt;= (less than or equal to)</li><li>Assignment Operators: =, +=, -=, *=, /=, %=, //=, **=</li><li>Logical Operators: and, or, not</li><li>Identity Operators: is, is not</li><li>Membership Operators: in, not in</li></ol><p>Expressions</p><p>Expressions are combinations of values, variables, and operators that are evaluated to produce a result. For example, the expression 2 + 3 would evaluate to 5.</p><p>You can use expressions in Python to perform calculations and to make decisions in your code. For example:</p><p>x = 10 y = 20</p><p>if x + y &gt; 20: print(“The sum of x and y is greater than 20”) else: print(“The sum of x and y is less than or equal to 20”)</p><p>In this example, the expression x + y is evaluated to 30, which is greater than 20, so the first print statement is executed.</p><p>Conclusion</p><p>In conclusion, operators and expressions are essential components of Python programming. Understanding how to use operators to perform operations on variables and values and how to create and evaluate expressions will help you write better and more efficient code in Python.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66f03d7f465f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>