<?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" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ Chepkirui Dorothy - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ Chepkirui Dorothy - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 24 May 2026 16:29:56 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/author/doroh/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ Learn Python Basics – A Guide for Beginners ]]>
                </title>
                <description>
                    <![CDATA[ Are you eager to dive into the world of programming but unsure where to begin? Look no further – Python is an excellent starting point for both newcomers and seasoned developers.  In this guide, I'll take you through the basics so you can get started... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/learn-python-basics/</link>
                <guid isPermaLink="false">66ba15982bddfbcfd2178948</guid>
                
                    <category>
                        <![CDATA[ beginner ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Python ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Chepkirui Dorothy ]]>
                </dc:creator>
                <pubDate>Tue, 20 Feb 2024 19:04:56 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/02/learn-python-image.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Are you eager to dive into the world of programming but unsure where to begin? Look no further – Python is an excellent starting point for both newcomers and seasoned developers. </p>
<p>In this guide, I'll take you through the basics so you can get started on your Python journey.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
    <li><a href="#prerequisites">Prerequisites</a></li>
    <li><a href="#why-learn-python">Why Learn Python?</a></li>
    <li><a href="#key-characteristics-of-python">Key Characteristics of Python</a></li>
    <li><a href="#practical-uses-of-python">Practical Uses of Python</a></li>
    <li><a href="#how-to-write-hello-world-in-python">How to Write "Hello, World" in Python</a></li>
    <li><a href="#python-variables-and-data-types">Python Variables and Data Types</a>
        <ul>
            <li><a href="#primitive-fundamental-data-types-">Primitive (Fundamental) Data Types</a>
                <ul>
                    <li><a href="#characteristics-of-primitive-data-types-">Characteristics of Primitive Data Types</a></li>
                    <li><a href="#use-cases-for-primitive-data-types-">Use Cases for Primitive Data Types</a></li>
                </ul>
            </li>
            <li><a href="#non-primitive-composite-data-types-in-python">Non-Primitive (Composite) Data Types in Python</a>
                <ul>
                    <li><a href="#characteristics-of-non-primitive-data-types-">Characteristics of Non-Primitive Data Types</a></li>
                    <li><a href="#use-cases-for-non-primitive-data-types-">Use Cases for Non-Primitive Data Types</a></li>
                </ul>
            </li>
        </ul>
    </li>
    <li><a href="#operators-in-python">Operators in Python</a>
        <ul>
            <li><a href="#arithmetic-operators-">Arithmetic Operators</a></li>
            <li><a href="#comparison-operators">Comparison Operators</a></li>
        </ul>
    </li>
    <li><a href="#statements-in-python">Statements in Python</a>
        <ul>
            <li><a href="#assignment-statements">Assignment Statements</a> </li>

             <li><a href="#print-statement">Print Statement</a></li>


            <li><a href="#conditional-statements-if-elif-else-">Conditional Statements (if, elif, else)</a>

                    </li><li><a href="#loops-for-and-while-">Loops (for and while)</a>
                        <ul>
                            <li><a href="#for-loop-">For Loop</a></li>
                            <li><a href="#while-loop-">While Loop</a></li>

                    </ul></li></ul> </li>
                    <li><a href="#break-and-continue-statements">Break and Continue Statements</a></li>


        </ul>
    
    <li><a href="#functions-in-python">Functions in Python</a></li>
    <li><a href="#conclusion">Conclusion</a></li>



<h3 id="heading-prerequisites">Prerequisites</h3>
<p>Before you embark on this coding adventure, make sure you have the following:</p>
<ul>
<li><a target="_blank" href="https://www.python.org/downloads/">Python installed</a>.</li>
<li>A code editor like <a target="_blank" href="https://code.visualstudio.com/download">VSCode</a>, <a target="_blank" href="https://www.vim.org/download.php">Vim</a>, or <a target="_blank" href="https://www.sublimetext.com/3">Sublime</a>.</li>
</ul>
<p>Now, let's explore the advantages of using Python.</p>
<h2 id="heading-why-learn-python">Why Learn Python?</h2>
<p>If you're wondering why Python is an excellent choice for beginners and seasoned developers alike, here are some of the reasons:</p>
<ul>
<li><strong>Readability and Simplicity:</strong> Python's clean syntax enhances code readability, reducing development time and making it beginner-friendly.</li>
<li><strong>Versatility:</strong> You can use Python to build a diverse range of applications, from web development to data science and AI. It also has an extensive standard library and many helpful third-party packages.</li>
<li><strong>Community and Documentation:</strong> Python has a robust community and comprehensive documentation that provides ample support, fostering the language's popularity and growth.</li>
<li><strong>Cross-Platform Compatibility:</strong> Ensures seamless execution across Windows, macOS, and Linux.</li>
<li><strong>Extensive Libraries and Frameworks:</strong> A rich ecosystem simplifies complex tasks, saving time and effort for developers.</li>
</ul>
<p>Hopefully, you're intrigued by Python's perks – so let's delve into its key characteristics.</p>
<h2 id="heading-key-characteristics-of-python">Key Characteristics of Python</h2>
<p>Understanding the key characteristics of Python will give you insights into its strengths and why it's a popular choice among developers:</p>
<ul>
<li><strong>Interpreted Language:</strong> Your code is not directly translated by the target machine. Instead, a special program called the interpreter reads and executes the code, allowing for cross-platform execution of your code.</li>
<li><strong>Dynamically Typed:</strong> Dynamic typing eliminates the need for explicit data type declarations, enhancing simplicity and flexibility.</li>
<li><strong>Object-Oriented:</strong> Python supports object-oriented principles, promoting code modularity and reusability.</li>
<li><strong>Indentation-based Syntax:</strong> Indentation-based syntax enforces code readability and maintains a consistent coding style.</li>
<li><strong>Memory Management:</strong> Automatic memory management through garbage collection simplifies memory handling for developers.</li>
</ul>
<h2 id="heading-practical-uses-of-python">Practical Uses of Python</h2>
<p>Python's versatility and readability make it suitable for a wide array of applications. Here are some practical uses:</p>
<ul>
<li><strong>Web Development:</strong> Python, with frameworks like Django and Flask, powers back-end development for robust web applications.</li>
<li><strong>Data Science and Machine Learning:</strong> Widely used in data science, Python's libraries like NumPy and Pandas support data analysis and machine learning.</li>
<li><strong>Automation and Scripting:</strong> Python excels in automating tasks and scripting, simplifying repetitive operations.</li>
<li><strong>AI and NLP:</strong> Python, with libraries like TensorFlow, dominates in AI and natural language processing applications.</li>
<li><strong>Game Development:</strong> Python, combined with Pygame, facilitates 2D game development for hobbyists and indie developers.</li>
<li><strong>Scientific Computing:</strong> Python is a valuable tool in scientific computing, chosen by scientists and researchers for its extensive libraries.</li>
</ul>
<p>Python is pre-installed in most Linux distributions. Follow <a target="_blank" href="https://www.datacamp.com/blog/how-to-install-python">this article</a> on how to install Python on Windows and MacOS.</p>
<h2 id="heading-how-to-write-hello-world-in-python">How to Write "Hello, World" in Python</h2>
<p>This is usually the first achievement when starting to code in any language: having your code say 'Hello world'. Open any code editor of your choice, and create a file named <code>project.py</code>. Inside the file, type the following:</p>
<pre><code class="lang-python">     print(<span class="hljs-string">"Hello, World!"</span>)
</code></pre>
<p>To run this code, open the command line interface (CLI). Follow <a target="_blank" href="https://www.freecodecamp.org/news/command-line-for-beginners/">this article</a> to understand more about CLI.</p>
<p>Make sure to open the directory where the file is saved, and run the following:</p>
<pre><code class="lang-bash"> python3 project.py
</code></pre>
<p>When you run this program, you'll see the timeless greeting displayed in your command line interface.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/Screenshot-from-2024-01-30-11-59-12.png" alt="Image" width="600" height="400" loading="lazy">
<em>hello world displayed in the CLI</em></p>
<p>‌Congratulations! You've just executed your first Python script. Now that you've printed a simple message, let's dive deeper into Python.</p>
<h2 id="heading-python-variables-and-data-types"><strong>Python Variables and Data Types</strong></h2>
<p>The primary purpose of computers is to process data into useful information, for that to happen, the data needs to be stored in its memory. This is achieved using a programming language's variables and data types.</p>
<p>Data types in Python are particular kinds of data items, as defined by the value they can take. Variables, on the other hand, are like labeled containers that store this data. They enable you to manage and modify information using specific identifiers.</p>
<p>Data types are generally classified into two types:</p>
<h3 id="heading-primitive-fundamental-data-types">Primitive (Fundamental) Data Types:</h3>
<p>Primitive data types represent simple values. These data types are the most basic and essential units used to store and manipulate information in a program. They translate directly into low-level machine code. </p>
<p>Primitive data types include:</p>
<ul>
<li><strong>String (<code>str</code>):</strong> Represents sequences of characters. Should be enclosed in quotes. Example: <code>"Hello, Python!"</code></li>
<li><strong>Integer (<code>int</code>):</strong> Represents whole numbers without decimals. Example: <code>42</code></li>
<li><strong>Float (<code>float</code>):</strong> Represents numbers with decimals. Example: <code>3.14</code></li>
<li><strong>Boolean (<code>bool</code>):</strong> Represents either <code>True</code> or <code>False</code>.</li>
</ul>
<h4 id="heading-characteristics-of-primitive-data-types">Characteristics of Primitive Data Types:</h4>
<ul>
<li><strong>Immutability:</strong> Primitive data types are immutable, meaning their values cannot be changed after they are created. Any operation that appears to modify a primitive value creates a new value.</li>
<li><strong>Direct Representation:</strong> Each primitive data type directly corresponds to a specific low-level machine code representation.</li>
<li><strong>Atomic Values:</strong> Primitive data types represent individual, atomic values. They are not composed of other types or structures.</li>
</ul>
<h4 id="heading-use-cases-for-primitive-data-types">Use Cases for Primitive Data Types:</h4>
<ul>
<li>Strings are used for text manipulation and representation.</li>
<li>Integers and floats are essential for numerical calculations.</li>
<li>Booleans are employed in logical operations and decision-making.</li>
</ul>
<p>Let's see how these work by continuing to write some Python code.</p>
<p>Modify your <code>project.py</code> file to include the following:</p>
<pre><code class="lang-python"><span class="hljs-comment"># String Example </span>
name = <span class="hljs-string">"John"</span>
<span class="hljs-comment"># Integer Example</span>
age = <span class="hljs-number">25</span> 
<span class="hljs-comment"># Float Example </span>
height = <span class="hljs-number">1.75</span> 
<span class="hljs-comment"># Boolean Example</span>
is_student = <span class="hljs-literal">True</span>
<span class="hljs-comment"># Print variable values </span>
print(<span class="hljs-string">"Name:"</span>, name) 
print(<span class="hljs-string">"Age:"</span>, age) 
print(<span class="hljs-string">"Height:"</span>, height)
print(<span class="hljs-string">"Is student?"</span>, is_student)
</code></pre>
<p>In this snippet, you've introduced variables with different data types. Run the program and observe how Python handles these data types.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/Screenshot-from-2024-01-30-12-02-11.png" alt="Image" width="600" height="400" loading="lazy">
<em>primitive data types</em></p>
<p>The output reveals the values assigned to the variables in the Python script. The <code>print</code> statements display the contents of the <code>name</code>, <code>age</code>, <code>height</code>, and <code>is_student</code> variables. </p>
<h3 id="heading-non-primitive-composite-data-types-in-python">‌‌Non-Primitive (Composite) Data Types in Python</h3>
<p>Non-primitive data types are structures that can hold multiple values and are composed of other data types, including both primitive and other composite types. Unlike primitive data types, non-primitive types allow for more complex and structured representations of data.</p>
<p>Non-primitive data types include:</p>
<ul>
<li><strong>List (<code>list</code>):</strong> Represents an ordered and mutable collection of values. Example: <code>fruits = ["apple", "banana", "cherry"]</code></li>
<li><strong>Tuple (<code>tuple</code>):</strong> Represents an ordered and immutable collection of values. Example: <code>coordinates = (3, 7)</code></li>
<li><strong>Dictionary (<code>dict</code>):</strong> Represents an unordered collection of key-value pairs. Example: <code>person = {"name": "Alice", "age": 25, "is_student": True}</code></li>
</ul>
<h4 id="heading-characteristics-of-non-primitive-data-types">Characteristics of Non-Primitive Data Types:</h4>
<ul>
<li><strong>Mutability:</strong> Lists are mutable, meaning their elements can be modified after creation. Tuples, on the other hand, are immutable – their elements cannot be changed. Dictionaries are mutable – you can add, modify, or remove key-value pairs.</li>
<li><strong>Collection of Values:</strong> Non-primitive data types allow the grouping of multiple values into a single structure, enabling the creation of more sophisticated data representations.</li>
<li><strong>Ordered (Lists and Tuples):</strong> Lists and tuples maintain the order of elements, allowing for predictable indexing.</li>
<li><strong>Key-Value Mapping (Dictionary):</strong> Dictionaries map keys to values, providing a way to organize and retrieve data based on specific identifiers.</li>
</ul>
<h4 id="heading-use-cases-for-non-primitive-data-types">Use Cases for Non-Primitive Data Types:</h4>
<ul>
<li><strong>Lists:</strong> Useful when you need a collection that can be altered during the program's execution, such as maintaining a list of items that may change over time.</li>
<li><strong>Tuples:</strong> Suitable when you want to ensure that the data remains constant and cannot be accidentally modified. Often used for representing fixed sets of values.</li>
<li><strong>Dictionaries:</strong> Ideal for scenarios where data needs to be associated with specific labels or keys. They offer efficient data retrieval based on these identifiers.</li>
</ul>
<p>Alright, continuing with our Python code – modify the <code>project.py</code> file as shown below:</p>
<pre><code class="lang-python"><span class="hljs-comment"># List Example</span>
fruits = [<span class="hljs-string">"apple"</span>, <span class="hljs-string">"banana"</span>, <span class="hljs-string">"cherry"</span>]
print(<span class="hljs-string">"List Example:"</span>, fruits)

<span class="hljs-comment"># Tuple Example</span>
coordinates = (<span class="hljs-number">3</span>, <span class="hljs-number">7</span>)
print(<span class="hljs-string">"Tuple Example:"</span>, coordinates)

<span class="hljs-comment"># Dictionary Example</span>
person = {<span class="hljs-string">"name"</span>: <span class="hljs-string">"Alice"</span>, <span class="hljs-string">"age"</span>: <span class="hljs-number">25</span>, <span class="hljs-string">"is_student"</span>: <span class="hljs-literal">True</span>}
print(<span class="hljs-string">"Dictionary Example:"</span>, person)
</code></pre>
<p>Run the program to see how lists and tuples allow you to organize and store data. In this code snippet:</p>
<ul>
<li>The <code>fruits</code> variable is a list containing strings representing different fruits.</li>
<li>The <code>coordinates</code> variable is a tuple with two integers representing coordinates.</li>
<li>The <code>person</code> variable is a dictionary associating keys ("name," "age," "is_student") with corresponding values.</li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/Screenshot-from-2024-01-31-11-19-39.png" alt="Image" width="600" height="400" loading="lazy">
<em>non-primitive data types</em></p>
<p>You can perform various operations on these structures, such as adding elements to a list or accessing individual items in a tuple.</p>
<p>Data types are crucial for several reasons:</p>
<ul>
<li><strong>Memory Allocation:</strong> Different data types require different amounts of memory. Knowing the data type allows the computer to allocate the appropriate amount of memory for a variable.</li>
<li><strong>Operations:</strong> Each data type supports specific operations. For example, you can add two <code>integer</code> numbers, concatenate two <code>strings</code>, or compare two <code>boolean</code> values.</li>
<li><strong>Error Prevention:</strong> Using the wrong data type in an operation can lead to errors. Data types help prevent unintended consequences by enforcing rules on how different types can interact.</li>
</ul>
<h2 id="heading-operators-in-python">Operators in Python</h2>
<p>Operators in Python are symbols that perform operations on variables and values.<br>An operand refers to the inputs or objects on which an operation is performed.</p>
<p>Let's explore some of the essential operators in Python:</p>
<h3 id="heading-arithmetic-operators">Arithmetic Operators:</h3>
<p>Arithmetic operators are fundamental components of any programming language, allowing developers to perform basic mathematical operations on numerical values. </p>
<p>In Python, several arithmetic operators enable you to carry out calculations efficiently. Let's explore these operators:</p>
<ul>
<li>Addition (+): Adds two operands.</li>
<li>Subtraction (-): Subtracts the right operand from the left operand.</li>
<li>Multiplication (*): Multiplies two operands.</li>
<li>Division (/): Divides the left operand by the right operand (always returns a float).</li>
<li>Modulus (%): Returns the remainder of the division of the left operand by the right operand.</li>
<li>Exponentiation (**): Raises the left operand to the power of the right operand.</li>
</ul>
<p>Modify your <code>project.py</code> file to include examples of these operators:</p>
<pre><code class="lang-python"> <span class="hljs-comment"># Arithmetic Operators</span>
 num1 = <span class="hljs-number">10</span> 
 num2 = <span class="hljs-number">3</span> 
 add_result = num1 + num2 
 sub_result = num1 - num2 
 mul_result = num1 * num2 
 div_result = num1 / num2 
 mod_result = num1 % num2 
 exp_result = num1 ** num2 
 print(<span class="hljs-string">"Addition:"</span>, add_result) 
 print(<span class="hljs-string">"Subtraction:"</span>, sub_result)
 print(<span class="hljs-string">"Multiplication:"</span>, mul_result) 
 print(<span class="hljs-string">"Division:"</span>, div_result) 
 print(<span class="hljs-string">"Modulus:"</span>, mod_result) 
 print(<span class="hljs-string">"Exponentiation:"</span>, exp_result)
</code></pre>
<p>The code above initializes two variables, <code>num1</code> and <code>num2</code>, with the values <code>10</code> and <code>3</code> respectively, representing two numerical operands.</p>
<p>Then, arithmetic operations are performed using these operands:</p>
<ul>
<li><code>add_result</code> stores the result of adding <code>num1</code> and <code>num2</code>.</li>
<li><code>sub_result</code> stores the result of subtracting <code>num2</code> from <code>num1</code>.</li>
<li><code>mul_result</code> stores the result of multiplying <code>num1</code> and <code>num2</code>.</li>
<li><code>div_result</code> stores the result of dividing <code>num1</code> by <code>num2</code>.</li>
<li><code>mod_result</code> stores the remainder of dividing <code>num1</code> by <code>num2</code>.</li>
<li><code>exp_result</code> stores the result of raising <code>num1</code> to the power of <code>num2</code>.</li>
</ul>
<p>Finally, the results of these arithmetic operations are printed using <code>print()</code> statements, each labeled appropriately, such as "Addition:", "Subtraction:", and so on, followed by the corresponding result.</p>
<p> Here's the output:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/arithmetic.png" alt="Image" width="600" height="400" loading="lazy">
<em>arithmetic operations</em></p>
<h3 id="heading-comparison-operators">Comparison Operators</h3>
<p>Comparison operators in Python are essential tools for evaluating and comparing values. They enable you to express conditions and make decisions based on the relationship between different values.  They return either <code>True</code> or <code>False</code> based on the comparison result.</p>
<p>Here are the common comparison operators:</p>
<ul>
<li>Equal to (==): Checks if two operands are equal.</li>
<li>Not equal to (!=): Checks if two operands are not equal.</li>
<li>Greater than (&gt;): Checks if the left operand is greater than the right operand.</li>
<li>Less than (&lt;): Checks if the left operand is less than the right operand.</li>
<li>Greater than or equal to (&gt;=): Checks if the left operand is greater than or equal to the right operand.</li>
<li>Less than or equal to (&lt;=): Checks if the left operand is less than or equal to the right operand.</li>
</ul>
<p>Extend your <code>project.py</code> file to include examples of comparison operators:</p>
<pre><code class="lang-python"> <span class="hljs-comment"># Comparison Operators </span>
 age = <span class="hljs-number">25</span>
 is_adult = age &gt;= <span class="hljs-number">18</span>
 is_teenager = age &gt;= <span class="hljs-number">13</span> <span class="hljs-keyword">and</span> age &lt; <span class="hljs-number">18</span>
 print(<span class="hljs-string">"Is adult?"</span>, is_adult)
 print(<span class="hljs-string">"Is teenager?"</span>, is_teenager)
</code></pre>
<p>The variable <code>age</code> is initialized with the value <code>25</code>, representing a person's age.</p>
<p>Then, the comparison operator <code>&gt;=</code> is used to evaluate whether <code>age</code> is greater than or equal to <code>18</code>. The result of this comparison determines the boolean value stored in the variable <code>is_adult</code>. If the age is <code>18</code> or older, <code>is_adult</code> will be <code>True</code>, indicating adulthood.</p>
<p>Then the logical operator <code>and</code> is utilized to combine two comparison operations. The first comparison, <code>age &gt;= 13</code>, checks if the age is <code>13</code> or older. The second comparison, <code>age &lt; 18</code>, ensures the age is less than <code>18</code>. If both conditions are true, <code>is_teenager</code> will be <code>True</code>, signifying teenage years.</p>
<p>Finally, the results are printed using <code>print()</code> statements, indicating whether the person is classified as an adult (<code>True</code> or <code>False</code>) and whether they are identified as a teenager (<code>True</code> or <code>False</code>).</p>
<p>Here's the output:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/is-adult.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-statements-in-python">Statements in Python</h2>
<p>Statements instruct the interpreter to perform specific actions or operations. These actions can range from simple assignments of values to variables to more complex control flow structures and iterations. </p>
<p>Understanding different types of statements is essential for writing effective and expressive Python code.</p>
<h3 id="heading-assignment-statements">Assignment Statements</h3>
<p>Assignment statements are the most basic type of statement in Python. They are used to assign values to variables, creating a named reference to data. </p>
<p>Here's an example:</p>
<pre><code class="lang-python">x = <span class="hljs-number">10</span> 
name = <span class="hljs-string">"Alice"</span>
</code></pre>
<p>In this snippet, <code>x</code> is assigned the integer value <code>10</code>, and the <code>name</code> is assigned the string <code>"Alice"</code>. These assignments create variables that can be used throughout the program.</p>
<h3 id="heading-print-statement">Print Statement</h3>
<p>The print statement is used to display output in the console. It is a crucial tool for debugging and providing information to users. Example:</p>
<pre><code class="lang-python">print(<span class="hljs-string">"Hello, Python!"</span>)
</code></pre>
<p>This code prints the string "Hello, Python!" to the console.</p>
<h3 id="heading-conditional-statements-if-elif-else">Conditional Statements (if, elif, else)</h3>
<p>Conditional statements are used when you want to execute different blocks of code based on certain conditions. </p>
<p>Suppose you wanted to determine if a person has reached the legal age for drinking.  Modify the <code>project.py</code> file with the following code:</p>
<pre><code class="lang-python"><span class="hljs-comment"># Conditional Statement Example </span>
age = <span class="hljs-number">20</span>
<span class="hljs-keyword">if</span> age &lt; <span class="hljs-number">18</span>:
    print(<span class="hljs-string">"You are a minor."</span>)
<span class="hljs-keyword">elif</span> <span class="hljs-number">18</span> &lt;= age &lt; <span class="hljs-number">21</span>:
    print(<span class="hljs-string">"You are an adult, but not yet allowed to drink."</span>)
<span class="hljs-keyword">else</span>:
    print(<span class="hljs-string">"You are a legal adult."</span>)
</code></pre>
<p>In this example:</p>
<ul>
<li>The <code>if</code> statement checks if <code>age</code> is less than 18.</li>
<li>The <code>elif</code> statement (shorthand for else if) checks if <code>age</code> is between 18 (inclusive) and 21 (exclusive).</li>
<li>The <code>else</code> statement is executed if none of the above conditions are met.</li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/drinking.png" alt="Image" width="600" height="400" loading="lazy">
<em>if else statement</em></p>
<p>A person aged 20 is not allowed to drink.</p>
<h3 id="heading-loops-for-and-while">Loops (for and while)</h3>
<p>Loops are used to repeat a block of code multiple times. There are two main types of loops in Python: <code>for</code> loops and <code>while</code> loops.</p>
<h4 id="heading-for-loop">For Loop:</h4>
<p>A <code>for</code> loop is used when you know the number of iterations in advance. Suppose you had a list containing the names of fruits, and you wanted to print each fruit. In this case, a <code>for</code> loop is an ideal choice for iterating over the elements of the list. </p>
<p>Here's an example using Python:</p>
<pre><code class="lang-python"><span class="hljs-comment"># for loop Example </span>
fruits = [<span class="hljs-string">"apple"</span>, <span class="hljs-string">"banana"</span>, <span class="hljs-string">"cherry"</span>]
<span class="hljs-keyword">for</span> fruit <span class="hljs-keyword">in</span> fruits:
    print(fruit)
</code></pre>
<p>‌In this example, the <code>for</code> loop iterates over each element in the <code>fruits</code> list and prints each fruit.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/apple.png" alt="Image" width="600" height="400" loading="lazy">
<em>list of fruits in the for loop</em></p>
<h4 id="heading-while-loop">While Loop:</h4>
<p>A <code>while</code> statement is a control flow statement that allows you to execute a block of code repeatedly as long as a specified condition is true.  </p>
<p>Suppose you want to simulate counting until a certain threshold is reached. Modify your <code>project.py</code> and add the following code:</p>
<pre><code class="lang-python"><span class="hljs-comment"># While Loop Example </span>
count = <span class="hljs-number">0</span>
<span class="hljs-keyword">while</span> count &lt; <span class="hljs-number">5</span>:
    print(<span class="hljs-string">"Count:"</span>, count)
    count += <span class="hljs-number">1</span>
</code></pre>
<p>In this scenario, the <code>while</code> loop continues executing as long as the <code>count</code> variable is less than 5. The code inside the loop increments the count and prints the current count in each iteration. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/count.png" alt="Image" width="600" height="400" loading="lazy">
<em>output of while loop</em></p>
<h3 id="heading-break-and-continue-statements">Break and Continue Statements</h3>
<p>Break and continue statements are used within loops.</p>
<ul>
<li><code>break</code>: Exits the loop.</li>
<li><p><code>continue</code>: Skips the rest of the code inside the loop for the current iteration, then continues the loop.</p>
<p>Examples:</p>
</li>
</ul>
<pre><code class="lang-python">‌<span class="hljs-comment"># Break Statement Example </span>
print(<span class="hljs-string">"Output with 'break':"</span>)
<span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> range(<span class="hljs-number">5</span>):
    <span class="hljs-keyword">if</span> i == <span class="hljs-number">3</span>:
        print(<span class="hljs-string">f"Encountered 'break' at i=<span class="hljs-subst">{i}</span>"</span>) 
        <span class="hljs-keyword">break</span>
    print(i)

<span class="hljs-comment"># Continue Statement Example </span>
print(<span class="hljs-string">"\nOutput with 'continue':"</span>)
<span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> range(<span class="hljs-number">5</span>):
    <span class="hljs-keyword">if</span> i == <span class="hljs-number">2</span>:
        print(<span class="hljs-string">f"Skipped iteration with 'continue' at i=<span class="hljs-subst">{i}</span>"</span>)
        <span class="hljs-keyword">continue</span>
    print(i)
</code></pre>
<p>‌In the <code>break</code> example, the loop stops when <code>i</code> is equal to 3, and the numbers 0, 1, and 2 are printed. </p>
<p>In the <code>continue</code> example, when <code>i</code> is equal to 2, the <code>continue</code> statement skips the <code>print(i)</code> statement for that iteration, resulting in the omission of the number 2 from the output.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/break1.png" alt="Image" width="600" height="400" loading="lazy">
<em>break and continue statements output</em></p>
<h2 id="heading-functions-in-python">Functions in Python</h2>
<p>Functions are reusable blocks of code, enhancing modularity by enclosing functionality into separate, organized units. This approach helps avoid code duplication and significantly improves code readability. </p>
<p>Inside the <code>project.py</code> file, write the following code:</p>
<pre><code class="lang-python"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">greet</span>():</span>
    print(<span class="hljs-string">"Hello, World!"</span>)

<span class="hljs-comment"># Call the function to execute</span>
greet()
</code></pre>
<p>The code above contains a simple Python function called <code>greet()</code>. When 'called' or 'invoked', this function prints "Hello, World!" to the console. It's a basic example illustrating how functions work in Python.</p>
<p>You can take this a step further by including parameters. Parameters serve as placeholders for values passed to a function during its invocation, allowing functions to accept input and perform operations based on that input.</p>
<p>Modify the previous example on <code>if elif else</code> statement to include functions:</p>
<pre><code class="lang-python"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">check_age</span>(<span class="hljs-params">age</span>):</span>
    <span class="hljs-keyword">if</span> age &lt; <span class="hljs-number">18</span>:
        print(<span class="hljs-string">"You are a minor."</span>)
    <span class="hljs-keyword">elif</span> <span class="hljs-number">18</span> &lt;= age &lt; <span class="hljs-number">21</span>:
        print(<span class="hljs-string">"You are an adult, but not yet allowed to drink."</span>)
    <span class="hljs-keyword">else</span>:
        print(<span class="hljs-string">"You are a legal adult."</span>)

<span class="hljs-comment"># Call the function with a specific age</span>
check_age(<span class="hljs-number">20</span>)
</code></pre>
<p>In this example, the <code>check_age</code> function takes an <code>age</code> parameter and performs the same conditional check as the original code. The function allows you to reuse this logic for different age values by simply calling the function with the desired age.</p>
<p>You can call <code>check_age</code> function with any age value, and it will print the appropriate message based on the age provided.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/Screenshot-from-2024-02-07-13-03-23.png" alt="Image" width="600" height="400" loading="lazy">
<em>functions</em></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>‌‌‌‌Embarking on your Python learning journey, this guide introduces the benefits of learning Python, its key characteristics, and practical use cases. </p>
<p>Starting with the iconic "Hello, World!" and progressing through variables, data types, statements, and functions, you've gained some hands-on experience with basic Python. We also talked about primitive and non-primitive data types, conditional statements, and loops.</p>
<p>As your journey progresses, delve into advanced topics like object-oriented programming, file handling, and real-world projects. Armed with foundational knowledge, you can now embrace coding challenges that come your way. Stay curious, and relish the rewarding process of coding with Python. Happy coding!</p>
<p>‌‌</p>
<p>‌‌</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Perform CRUD Operations with Django Models ]]>
                </title>
                <description>
                    <![CDATA[ Django is a super useful tool for building web applications with Python. It follows the Model-View-Template (MVT) architecture, which is a popular design pattern for building web apps. In the MVT architecture, the Model refers to the internal represe... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/models-in-django/</link>
                <guid isPermaLink="false">66ba159c75342295f49b3e2f</guid>
                
                    <category>
                        <![CDATA[ Django ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Python ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Chepkirui Dorothy ]]>
                </dc:creator>
                <pubDate>Thu, 18 Jan 2024 16:10:49 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/01/coding-924920.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Django is a super useful tool for building web applications with Python. It follows the Model-View-Template (MVT) architecture, which is a popular design pattern for building web apps.</p>
<p>In the MVT architecture, the Model refers to the internal representation of information stored, the View is responsible for processing user requests and returning appropriate responses, and the Template is responsible for rendering the data received from the View.</p>
<p>This guide focuses on the Model part of the architecture, which is the central component of your application and where you typically start when designing your applications. The Model is responsible for the internal representation of your data and provides an interface for interacting directly with the database.</p>
<p>In this tutorial, you will learn how to use Django's interactive shell to create, read, update, and delete objects. You will also learn about registering models in the admin interface, which is useful for designing well-organized databases for your Django projects. </p>
<p>These skills will allow you to manage your projects more efficiently and ensure they function smoothly.</p>
<h3 id="heading-prerequisites">Prerequisites</h3>
<p>To get the most out of this tutorial, you'll need to have a basic understanding of Python and Django.</p>
<h2 id="heading-how-to-set-up-the-project">How to Set Up the Project</h2>
<p>To help you understand the concepts in this tutorial, you will develop a simple 'todo' app.</p>
<p>To get started, create a new directory where you will host the project, then change directories into it.</p>
<p>Once inside the folder, install <code>virtualenv</code>, a tool for establishing isolated Python environments.</p>
<pre><code class="lang-bash">pip install virtualenv
virtualenv venv
<span class="hljs-built_in">source</span> venv/bin/activate
</code></pre>
<p><code>pip install virtualenv</code> installs the necessary tool. <code>virtualenv venv</code> creates a virtual environment called venv. Lastly, <code>source venv/bin/activate</code> activates the virtual environment, allowing for isolated Python development within the designated environment. </p>
<p>Feel free to replace "venv" with the name you chose during the virtual environment creation.</p>
<p>Make sure Django is installed. If not, install it via the command line like this:</p>
<pre><code class="lang-bash">pip install django
</code></pre>
<p>Start a project using the following command:</p>
<pre><code class="lang-bash">django-admin startproject todoproject
</code></pre>
<p> Change into the project directory, <code>todoproject</code>, then create a new app. </p>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> todoproject
python manage.py startapp todoapp
</code></pre>
<p>Next, include the app's name in the <code>INSTALLED_APPS</code> list in <code>settings.py</code>. In your code editor, navigate to <code>settings.py</code> file.</p>
<pre><code class="lang-python"> INSTALLED_APPS = [
    <span class="hljs-string">'django.contrib.admin'</span>,
    <span class="hljs-string">'django.contrib.auth'</span>,
    <span class="hljs-string">'django.contrib.contenttypes'</span>,
    <span class="hljs-string">'django.contrib.sessions'</span>,
    <span class="hljs-string">'django.contrib.messages'</span>,
    <span class="hljs-string">'django.contrib.staticfiles'</span>, 
    <span class="hljs-string">'todoapp'</span> <span class="hljs-comment"># new app</span>
]
</code></pre>
<h2 id="heading-django-models">Django Models</h2>
<p>A <a target="_blank" href="https://docs.djangoproject.com/en/5.0/topics/db/models/">model</a> is like the go-to expert for all your data in Django. It's like a detailed plan that says what info you want to store, how to store it, and how it can be retrieved.</p>
<p>The todo app will store tasks. You will keep it simple by only storing the title of the task to be done and it's completion status – that is, whether or not the task has been done. Open the <code>models.py</code> file in your text editor and add the following code:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> django.db <span class="hljs-keyword">import</span> models

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Task</span>(<span class="hljs-params">models.Model</span>):</span>
    title = models.CharField(max_length=<span class="hljs-number">100</span>)
    completed = models.BooleanField(default=<span class="hljs-literal">False</span>)
</code></pre>
<p>In this super simple model:</p>
<ul>
<li><code>Task</code> is the name of the model.</li>
<li><code>title</code> is a field of type <code>CharField</code> with a maximum length of 100 characters. This field is suitable for storing short text.</li>
<li><code>completed</code> is a field of type <code>BooleanField</code> with a default value of <code>False</code>. This field is a boolean (True/False). The default value is set to <code>False</code>, assuming tasks start as not completed by default.</li>
</ul>
<p>The main part of a model is the list of things it stores (called fields). <code>title</code> and <code>completed</code> are fields, which are of the <code>BooleanField</code> and <code>CharField</code> field types.</p>
<p>Other examples of field types you can use include:</p>
<ul>
<li><code>AutoField</code>: an <code>IntegerField</code> that automatically increments.</li>
<li><code>BooleanField</code>: represents true/false values.</li>
<li><code>CharField</code>: stores text-based values.</li>
<li><code>DateField</code>: represents a date using a <code>datetime.date</code> instance.</li>
<li><code>DateTimeField</code>: represents date and time using a <code>datetime.datetime</code> instance.</li>
<li><code>DecimalField</code>: represents a fixed-precision decimal number using a <code>Decimal</code> instance.</li>
<li><code>EmailField</code>: a <code>CharField</code> validating the value as a valid email address.</li>
<li><code>ImageField</code>: inherits from <code>FileField</code>, ensuring uploaded objects are valid images.</li>
<li><code>IntegerField</code>: stores integer values within a safe range.</li>
<li><code>SlugField</code>: represents a short label for something, typically used in URLs.</li>
<li><code>TextField</code>: a large text field.</li>
<li><code>TimeField</code>: represents time using a <code>datetime.time</code> instance.</li>
<li><code>URLField</code>: a <code>CharField</code> for URLs.</li>
</ul>
<p>Other field types explain the relationship between the tables:</p>
<ul>
<li><code>ForeignKey</code>: represents a many-to-one relationship.</li>
<li><code>ManyToManyField</code>: represents a many-to-many relationship. </li>
<li><code>OneToOneField</code>: signifies a one-to-one relationship. Essentially, it's akin to a <code>ForeignKey</code> with <code>unique=True</code>, but the "reverse" side of the relationship directly yields a single object.</li>
</ul>
<p>To synchronize your database with the latest changes in your Django models, you must run migrations. Make sure you are in the same directory as the <code>manage.py</code> file is, and then run the following:</p>
<pre><code class="lang-bash">python manage.py makemigrations
python manage.py migrate
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/01/Screenshot-from-2024-01-12-14-48-39.png" alt="Image" width="600" height="400" loading="lazy">
<em>making migratiions</em></p>
<p>Register your models in the <code>admin.py</code> file. This enables administrators to view, add, edit, and delete instances of the <code>Task</code> model through the Django admin interface. It's a convenient way to interact with your data during development and testing.</p>
<pre><code class="lang-python"><span class="hljs-comment">#admin.py</span>
<span class="hljs-keyword">from</span> django.contrib <span class="hljs-keyword">import</span> admin
<span class="hljs-keyword">from</span> .models <span class="hljs-keyword">import</span> Task
<span class="hljs-comment"># Register your models here.</span>

admin.site.register(Task)
</code></pre>
<p>You need to create a <code>superuser</code> in order to access the Django admin interface. In the terminal, run the following:</p>
<pre><code class="lang-python">python manage.py createsuperuser
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/01/Screenshot-from-2024-01-12-14-52-19.png" alt="Image" width="600" height="400" loading="lazy">
<em>creating a superuser</em></p>
<p>Follow the prompts, and you should have a superuser account to access the admin interface.</p>
<h2 id="heading-the-django-shell">The Django Shell</h2>
<p>You would typically write your logic in a view, but because we want to do more experiments, you will use the Django shell. It is a powerful and versatile tool that enhances the development and testing experience of your Django projects. The shell also provides a dynamic and interactive environment for working with your code, data, and models.</p>
<p> To access the shell, run the following command from the project directory:</p>
<pre><code class="lang-bash">python manage.py shell
</code></pre>
<p>Start by importing the Task model.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/01/Screenshot-from-2024-01-12-15-15-57.png" alt="Image" width="600" height="400" loading="lazy">
<em>importing the model to the Django shell</em></p>
<p>The basic operations performed on a model will typically be creating, reading, updating, and deleting – hence the name CRUD application. You will learn how to perform all four operations here.</p>
<h3 id="heading-create">CREATE</h3>
<p>To create a new task, type the following in your shell:</p>
<pre><code class="lang-bash">
&gt;&gt;&gt; new_task = Task(title=<span class="hljs-string">'Complete Assignment'</span>, completed=False)
&gt;&gt;&gt; new_task.save()
</code></pre>
<p>Alternatively, you can use the <code>create</code> function, like this:</p>
<pre><code class="lang-bash">
Task.objects.create(title=<span class="hljs-string">'Another Task'</span>, completed=False)
</code></pre>
<p>To check all the tasks, enter the following:</p>
<pre><code class="lang-bash">Task.objects.all()
</code></pre>
<p>You should get something similar to what you see in the below image. Notice that a queryset is returned with the task you just created:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/01/Screenshot-from-2024-01-15-12-32-55.png" alt="Image" width="600" height="400" loading="lazy">
<em>creating objects in Django shell</em></p>
<h3 id="heading-read">READ</h3>
<p>Once you have created the objects, you should be able to read them. To do this, Django provides the <code>get()</code> and <code>filter()</code>methods. </p>
<p>The <code>get()</code> method retrieves a single object from the database based on specified conditions. It raises exceptions if no object or multiple objects are found, making it suitable for unique queries.</p>
<p>The <code>filter()</code> method retrieves a queryset of database objects matching specified conditions. It doesn't raise exceptions if multiple or no objects are found and is, therefore, ideal for queries with multiple possible results.</p>
<p>You can use the <code>get()</code> method to retrieve the task with a specific title.</p>
<pre><code class="lang-bash">
specific_task = Task.objects.get(title=<span class="hljs-string">'Complete Assignment'</span>)
<span class="hljs-built_in">print</span>(f<span class="hljs-string">'Title: {specific_task.title}, Completed: {specific_task.completed}'</span>)
</code></pre>
<p>The output of the above code is the following:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/01/Screenshot-from-2024-01-15-13-59-07.png" alt="Image" width="600" height="400" loading="lazy">
<em>retrieving a specific object in Django shell</em></p>
<p>You can also retrieve a task if it meets a specific condition. This is where the filter method shines. </p>
<p>Say you wanted to get incomplete tasks, that is tasks with the <code>completed</code> field set to <code>False</code>. You can add this code:</p>
<pre><code class="lang-bash">incomplete_tasks = Task.objects.filter(completed=False)
<span class="hljs-keyword">for</span> task <span class="hljs-keyword">in</span> incomplete_tasks:
    <span class="hljs-built_in">print</span>(f<span class="hljs-string">'Title: {task.title}, Completed: {task.completed}'</span>)
</code></pre>
<p>This will return all the tasks that have not been completed.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/01/Screenshot-from-2024-01-15-14-02-44-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>retrieving objects that meet specific condition in Django shell</em></p>
<p>This method is ideal for retrieving multiple objects based on certain conditions.</p>
<h3 id="heading-update">UPDATE</h3>
<p>If you want to make changes, then you can do so using the <code>update()</code> method. Suppose you've completed all the tasks and now want to mark them as done. Here's the code for that:</p>
<pre><code class="lang-bash">incomplete_tasks = Task.objects.filter(completed=False)
incomplete_tasks.update(completed=True)

all_tasks = Task.objects.all()

<span class="hljs-keyword">for</span> task <span class="hljs-keyword">in</span> all_tasks:
    <span class="hljs-built_in">print</span>(f<span class="hljs-string">'Title: {task.title}, Completed: {task.completed}'</span>)
</code></pre>
<p>The output of the above code is:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/01/Screenshot-from-2024-01-15-14-37-07-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>updating objects in Django shell</em></p>
<p>This first updates the status of the tasks to <code>completed</code>, then prints the completed tasks. </p>
<h3 id="heading-delete">DELETE</h3>
<p>After everything, you may want to delete all the tasks or a specific task. You can do so by using <code>delete()</code> method, like this:</p>
<pre><code class="lang-bash">task_to_delete = Task.objects.get(title=<span class="hljs-string">'Another Task'</span>) 
task_to_delete.delete() 
all_tasks_after_deletion = Task.objects.all() 

<span class="hljs-keyword">for</span> task <span class="hljs-keyword">in</span> all_tasks_after_deletion:
    <span class="hljs-built_in">print</span>(f<span class="hljs-string">'Title: {task.title}, Completed: {task.completed}'</span>)
</code></pre>
<p>The code above gets the task with the title "Another Task" using the <code>get</code> method and then deletes it using the <code>delete</code> method. Finally, it prints the details of all remaining tasks to verify that the deletion was successful.</p>
<p>The output is:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/01/Screenshot-from-2024-01-15-14-53-40.png" alt="Image" width="600" height="400" loading="lazy">
<em>deleting objects in Django shell</em></p>
<p>Alternatively, you can simplify the code above like this:</p>
<pre><code class="lang-bash">task_to_delete = Task.objects.get(title=<span class="hljs-string">'Another Task'</span>).delete() 
all_tasks_after_deletion = Task.objects.all() 

<span class="hljs-keyword">for</span> task <span class="hljs-keyword">in</span> all_tasks_after_deletion:
    <span class="hljs-built_in">print</span>(f<span class="hljs-string">'Title: {task.title}, Completed: {task.completed}'</span>)
</code></pre>
<p>You can access all the tasks that you created in the Django admin panel. Start the server in the terminal as follows:</p>
<pre><code class="lang-bash">python manage.py runserver
</code></pre>
<p>Then on your browser, visit the site <a target="_blank" href="http://127.0.0.1:8000/admin/"><code>http://127.0.0.1:8000/admin/</code></a> and enter the superuser credentials you created earlier. There, you can access all the tasks that you created. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/01/Screenshot-from-2024-01-15-14-59-40.png" alt="Image" width="600" height="400" loading="lazy">
<em>Django admin interface</em></p>
<p>We deleted the other task, so the remaining task is the 'Complete assignment' task as shown above. </p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In this tutorial, you explored practical examples of creating, reading, updating, and deleting objects, enhancing your proficiency in using Django's interactive shell. </p>
<p>You also learned about the importance of registering models in the admin interface for easy management during development.</p>
<p>With this knowledge, you're now equipped to design robust and organized databases, ensuring the smooth functioning of your Django projects. Explore Django's capabilities and unleash your creativity in building dynamic and interactive web applications.</p>
<p>Happy coding.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
