<?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"><channel><title><![CDATA[Sritesh's Tech Journal]]></title><description><![CDATA[Sritesh's Tech Journal]]></description><link>https://sritesh-tech-journal.hashnode.dev</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1593680282896/kNC7E8IR4.png</url><title>Sritesh&apos;s Tech Journal</title><link>https://sritesh-tech-journal.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 14:06:55 GMT</lastBuildDate><atom:link href="https://sritesh-tech-journal.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Day 10 – Taking User Input in Python]]></title><description><![CDATA[Day 10 – Taking User Input in Python
Welcome to Day 10 of 100 Days of Python!
Until now, most of our programs have worked with values that we directly wrote inside the code.
But what if we want the us]]></description><link>https://sritesh-tech-journal.hashnode.dev/day-10-taking-user-input-in-python</link><guid isPermaLink="true">https://sritesh-tech-journal.hashnode.dev/day-10-taking-user-input-in-python</guid><category><![CDATA[100 days of python	]]></category><category><![CDATA[Python]]></category><category><![CDATA[Python 3]]></category><dc:creator><![CDATA[SRITESH SURANJAN]]></dc:creator><pubDate>Sun, 13 Sep 2026 17:37:05 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/05213490-17a3-405a-8969-b90be44dbbad.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<img src="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/1f6322ae-99be-4c1a-91ee-001713b1ff9c.jpg" alt="" style="display:block;margin:0 auto" />

<h1>Day 10 – Taking User Input in Python</h1>
<p>Welcome to <strong>Day 10 of 100 Days of Python!</strong></p>
<p>Until now, most of our programs have worked with values that we directly wrote inside the code.</p>
<p>But what if we want the <strong>user to provide the data while the program is running?</strong></p>
<p>That's where Python's built-in <code>input()</code> <strong>function</strong> comes in.</p>
<p>In this lesson, we will learn:</p>
<ul>
<li><p>How to take input from a user</p>
</li>
<li><p>How <code>input()</code> works</p>
</li>
<li><p>Why <code>input()</code> always returns a string</p>
</li>
<li><p>How to take integer and float input</p>
</li>
<li><p>How to use a prompt with <code>input()</code></p>
</li>
<li><p>How type casting works with user input</p>
</li>
<li><p>A common mistake when performing calculations with input</p>
</li>
</ul>
<hr />
<h1>1. What is User Input?</h1>
<p><strong>User input</strong> is data provided by a user while a program is running.</p>
<p>Python provides the built-in <code>input()</code> function to take input from the user.</p>
<p>The basic syntax is:</p>
<pre><code class="language-python">variable = input()
</code></pre>
<p>For example:</p>
<pre><code class="language-python">name = input()

print(name)
</code></pre>
<p>If the user enters:</p>
<pre><code class="language-text">Sritesh
</code></pre>
<p>The output will be:</p>
<pre><code class="language-text">Sritesh
</code></pre>
<p>The value entered by the user is stored in the variable <code>name</code>.</p>
<hr />
<h1>2. How Does <code>input()</code> Work?</h1>
<p>When Python encounters <code>input()</code>, the program pauses and waits for the user to enter something.</p>
<p>For example:</p>
<pre><code class="language-python">name = input()

print("Hello, " + name)
</code></pre>
<p>If the user enters:</p>
<pre><code class="language-text">Sritesh
</code></pre>
<p>The program produces:</p>
<pre><code class="language-text">Hello, Sritesh
</code></pre>
<p>So the basic flow is:</p>
<pre><code class="language-text">Program
   ↓
input()
   ↓
User enters data
   ↓
Python receives the data
   ↓
Value is stored in a variable
</code></pre>
<hr />
<h1>3. Important: <code>input()</code> Always Returns a String</h1>
<p>This is one of the most important things to remember about <code>input()</code>:</p>
<blockquote>
<p><strong>The</strong> <code>input()</code> <strong>function always returns the user's input as a string (</strong><code>str</code><strong>).</strong></p>
</blockquote>
<p>For example:</p>
<pre><code class="language-python">age = input()

print(age)
print(type(age))
</code></pre>
<p>If the user enters:</p>
<pre><code class="language-text">23
</code></pre>
<p>The output will be:</p>
<pre><code class="language-text">23
&lt;class 'str'&gt;
</code></pre>
<p>Even though we entered <code>23</code>, Python received it as:</p>
<pre><code class="language-python">"23"
</code></pre>
<p>not:</p>
<pre><code class="language-python">23
</code></pre>
<p>This becomes very important when we want to perform calculations.</p>
<hr />
<h1>4. Taking Integer Input</h1>
<p>If we need an integer from the user, we can use <code>int()</code> with <code>input()</code>.</p>
<pre><code class="language-python">age = int(input())

print(age)
print(type(age))
</code></pre>
<p>If the user enters:</p>
<pre><code class="language-text">23
</code></pre>
<p>Output:</p>
<pre><code class="language-text">23
&lt;class 'int'&gt;
</code></pre>
<p>Here:</p>
<pre><code class="language-python">input()
</code></pre>
<p>takes the input as a string, and:</p>
<pre><code class="language-python">int()
</code></pre>
<p>converts that string into an integer.</p>
<p>The process is:</p>
<pre><code class="language-text">User enters 23
      ↓
input()
      ↓
"23"
      ↓
int()
      ↓
23
</code></pre>
<hr />
<h1>5. Taking Float Input</h1>
<p>We can also take decimal values using <code>float()</code>.</p>
<pre><code class="language-python">price = float(input())

print(price)
print(type(price))
</code></pre>
<p>If the user enters:</p>
<pre><code class="language-text">99.50
</code></pre>
<p>Output:</p>
<pre><code class="language-text">99.5
&lt;class 'float'&gt;
</code></pre>
<p>The general pattern is:</p>
<pre><code class="language-python">integer_value = int(input())
float_value = float(input())
string_value = input()
</code></pre>
<hr />
<h1>6. Displaying a Message with <code>input()</code></h1>
<p>We don't have to leave <code>input()</code> empty.</p>
<p>We can provide a message inside the parentheses.</p>
<p>This message is called the <strong>prompt</strong>.</p>
<p>Example:</p>
<pre><code class="language-python">name = input("Enter your name: ")

print(name)
</code></pre>
<p>The user will see:</p>
<pre><code class="language-text">Enter your name: Sritesh
</code></pre>
<p>After entering the name, the program prints:</p>
<pre><code class="language-text">Sritesh
</code></pre>
<p>The syntax is:</p>
<pre><code class="language-python">variable = input("Prompt message")
</code></pre>
<hr />
<h1>7. Creating a Greeting Program</h1>
<p>We can combine <code>input()</code> with string concatenation to create a simple interactive program.</p>
<pre><code class="language-python">name = input("Enter your name: ")

print("Hello, " + name + "!")
</code></pre>
<p>Example:</p>
<pre><code class="language-text">Enter your name: Sritesh
Hello, Sritesh!
</code></pre>
<p>This is more useful than hard-coding the name:</p>
<pre><code class="language-python">print("Hello, Sritesh!")
</code></pre>
<p>because now the program can greet different users.</p>
<hr />
<h1>8. Taking Multiple Inputs</h1>
<p>We can take multiple values from the user and store them in different variables.</p>
<p>For example:</p>
<pre><code class="language-python">first_name = input("Enter your first name: ")
last_name = input("Enter your last name: ")

print("Hello,", first_name, last_name)
</code></pre>
<p>Example:</p>
<pre><code class="language-text">Enter your first name: Sritesh
Enter your last name: Suranjan
Hello, Sritesh Suranjan
</code></pre>
<hr />
<h1>9. A Common Mistake with Numbers</h1>
<p>Consider this program:</p>
<pre><code class="language-python">a = input("Enter first number: ")
b = input("Enter second number: ")

print(a + b)
</code></pre>
<p>Suppose the user enters:</p>
<pre><code class="language-text">10
20
</code></pre>
<p>You might expect:</p>
<pre><code class="language-text">30
</code></pre>
<p>But the output is:</p>
<pre><code class="language-text">1020
</code></pre>
<p>Why?</p>
<p>Because <code>input()</code> returns strings.</p>
<p>Python is actually performing:</p>
<pre><code class="language-python">"10" + "20"
</code></pre>
<p>For strings, <code>+</code> means <strong>concatenation</strong>, not mathematical addition.</p>
<p>So:</p>
<pre><code class="language-text">"10" + "20"
      ↓
"1020"
</code></pre>
<hr />
<h1>10. Converting User Input to Integers</h1>
<p>To perform numerical addition, we need to convert the input into integers.</p>
<pre><code class="language-python">a = input("Enter first number: ")
b = input("Enter second number: ")

print(int(a) + int(b))
</code></pre>
<p>If the user enters:</p>
<pre><code class="language-text">10
20
</code></pre>
<p>The output is:</p>
<pre><code class="language-text">30
</code></pre>
<p>We can also convert the values while taking the input:</p>
<pre><code class="language-python">a = int(input("Enter first number: "))
b = int(input("Enter second number: "))

print(a + b)
</code></pre>
<p>This is a very common pattern in Python.</p>
<hr />
<h1>11. Practical Example</h1>
<p>Let's combine everything we have learned so far.</p>
<pre><code class="language-python">name = input("Enter your Name: ")
print("Hello, " + name + "!")

first_number = input("Enter first number: ")
second_number = input("Enter second number: ")

print(first_number + second_number)
print(int(first_number) + int(second_number))
</code></pre>
<p>Example:</p>
<pre><code class="language-text">Enter your Name: Sritesh
Hello, Sritesh!
Enter first number: 10
Enter second number: 20
1020
30
</code></pre>
<p>The first result:</p>
<pre><code class="language-text">1020
</code></pre>
<p>is string concatenation.</p>
<p>The second result:</p>
<pre><code class="language-text">30
</code></pre>
<p>is numerical addition after type conversion.</p>
<p>This example connects directly with what we learned on <strong>Day 9 – Type Casting in Python</strong>.</p>
<hr />
<h1>12. <code>input()</code> with Different Data Types</h1>
<p>Here are some common patterns:</p>
<h3>String</h3>
<pre><code class="language-python">name = input("Enter your name: ")
</code></pre>
<h3>Integer</h3>
<pre><code class="language-python">age = int(input("Enter your age: "))
</code></pre>
<h3>Float</h3>
<pre><code class="language-python">price = float(input("Enter the price: "))
</code></pre>
<p>Remember:</p>
<pre><code class="language-python">input()
</code></pre>
<p>itself always produces a string.</p>
<p>The conversion happens because we explicitly use:</p>
<pre><code class="language-python">int()
</code></pre>
<p>or:</p>
<pre><code class="language-python">float()
</code></pre>
<hr />
<h1>13. Complete Program</h1>
<p>Here is the complete program for today's lesson:</p>
<pre><code class="language-python">a = input("Enter your Name: ")
print("Hello, " + a + "!")

b = input("Enter first number: ")
c = input("Enter second number: ")

print(b + c)
print(int(b) + int(c))
</code></pre>
<p>Example output:</p>
<pre><code class="language-text">Enter your Name: Sritesh
Hello, Sritesh!
Enter first number: 10
Enter second number: 20
1020
30
</code></pre>
<hr />
<h1>14. Important Things to Remember</h1>
<h3><code>input()</code> always returns a string</h3>
<pre><code class="language-python">value = input()
print(type(value))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">&lt;class 'str'&gt;
</code></pre>
<h3>Use <code>int()</code> for integers</h3>
<pre><code class="language-python">age = int(input())
</code></pre>
<h3>Use <code>float()</code> for decimal numbers</h3>
<pre><code class="language-python">price = float(input())
</code></pre>
<h3>Use a prompt to guide the user</h3>
<pre><code class="language-python">name = input("Enter your name: ")
</code></pre>
<h3>Don't forget type conversion for calculations</h3>
<pre><code class="language-python">a = int(input())
b = int(input())

print(a + b)
</code></pre>
<hr />
<h1>15. Quick Revision</h1>
<pre><code class="language-text">                User Input
                    │
                    ▼
                 input()
                    │
                    ▼
              Always returns
                 a string
                    │
          ┌─────────┴─────────┐
          ▼                   ▼
       int()                float()
          │                   │
          ▼                   ▼
       Integer              Float
</code></pre>
<h3>Remember These:</h3>
<pre><code class="language-python">name = input("Enter your name: ")

age = int(input("Enter your age: "))

price = float(input("Enter the price: "))
</code></pre>
<p>And remember the classic beginner example:</p>
<pre><code class="language-python">"10" + "20"           # "1020"

int("10") + int("20") # 30
</code></pre>
<hr />
<h1>16. Key Takeaways</h1>
<p>After completing Day 10, you should understand:</p>
<ul>
<li><p>What user input is</p>
</li>
<li><p>How to use Python's <code>input()</code> function</p>
</li>
<li><p>How to store user input in variables</p>
</li>
<li><p>Why <code>input()</code> always returns a string</p>
</li>
<li><p>How to take integer input using <code>int()</code></p>
</li>
<li><p>How to take decimal input using <code>float()</code></p>
</li>
<li><p>How to display a prompt to the user</p>
</li>
<li><p>Why <code>"10" + "20"</code> produces <code>"1020"</code></p>
</li>
<li><p>How type casting allows us to perform numerical calculations</p>
</li>
<li><p>How to create a simple interactive Python program</p>
</li>
</ul>
<p>The <code>input()</code> function is an important step because our programs are no longer limited to values written directly in the source code. We can now make programs that <strong>interact with users and respond to the data they provide</strong>.</p>
<hr />
<h2><strong>📂 Day 10 Resources</strong></h2>
<p>All notes and code for this day are available in the GitHub repository:</p>
<p><a class="embed-card" href="https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/10-Day10-Taking-User-Input">https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/10-Day10-Taking-User-Input</a></p>

<hr />
]]></content:encoded></item><item><title><![CDATA[Day 9 – Type Casting in Python: Explicit & Implicit Type Conversion]]></title><description><![CDATA[What is Type Casting?
Type casting, also called type conversion, is the process of converting a value from one data type to another.
For example, a value stored as a string can be converted into an in]]></description><link>https://sritesh-tech-journal.hashnode.dev/day-9-type-casting-in-python-explicit-implicit-type-conversion</link><guid isPermaLink="true">https://sritesh-tech-journal.hashnode.dev/day-9-type-casting-in-python-explicit-implicit-type-conversion</guid><category><![CDATA[100 days of python	]]></category><category><![CDATA[Python]]></category><category><![CDATA[Python 3]]></category><dc:creator><![CDATA[SRITESH SURANJAN]]></dc:creator><pubDate>Sun, 13 Sep 2026 06:29:16 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/3cb06a51-c64b-4b57-a52f-98974aa2f9ea.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<img src="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/9451d23c-f4d9-4424-bfa7-b6f54e021f27.jpg" alt="" style="display:block;margin:0 auto" />

<h2>What is Type Casting?</h2>
<p><strong>Type casting</strong>, also called <strong>type conversion</strong>, is the process of converting a value from one data type to another.</p>
<p>For example, a value stored as a string can be converted into an integer:</p>
<pre><code class="language-python">a = "10"
b = int(a)

print(b)
print(type(b))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">10
&lt;class 'int'&gt;
</code></pre>
<p>Python provides several built-in functions that can be used for type conversion, including:</p>
<table>
<thead>
<tr>
<th>Function</th>
<th>Converts a value to</th>
</tr>
</thead>
<tbody><tr>
<td><code>int()</code></td>
<td>Integer</td>
</tr>
<tr>
<td><code>float()</code></td>
<td>Floating-point number</td>
</tr>
<tr>
<td><code>str()</code></td>
<td>String</td>
</tr>
<tr>
<td><code>bool()</code></td>
<td>Boolean</td>
</tr>
<tr>
<td><code>list()</code></td>
<td>List</td>
</tr>
<tr>
<td><code>tuple()</code></td>
<td>Tuple</td>
</tr>
<tr>
<td><code>set()</code></td>
<td>Set</td>
</tr>
<tr>
<td><code>dict()</code></td>
<td>Dictionary, when the input has a valid dictionary-compatible structure</td>
</tr>
<tr>
<td><code>ord()</code></td>
<td>Unicode code point of a single character</td>
</tr>
<tr>
<td><code>hex()</code></td>
<td>Hexadecimal string representation of an integer</td>
</tr>
<tr>
<td><code>oct()</code></td>
<td>Octal string representation of an integer</td>
</tr>
</tbody></table>
<hr />
<h1>Types of Type Conversion</h1>
<p>Python type conversion can generally be understood in two ways:</p>
<ol>
<li><p><strong>Explicit Type Conversion</strong></p>
</li>
<li><p><strong>Implicit Type Conversion</strong></p>
</li>
</ol>
<hr />
<h2>1. Explicit Type Conversion</h2>
<p><strong>Explicit type conversion</strong> happens when the programmer manually converts a value from one data type to another.</p>
<p>This is also commonly called <strong>explicit type casting</strong>.</p>
<p>Python's built-in conversion functions such as <code>int()</code>, <code>float()</code>, and <code>str()</code> can be used for this purpose.</p>
<h3>Example</h3>
<pre><code class="language-python">string = "15"
number = 7

string_number = int(string)

total = number + string_number

print("The sum of both numbers is:", total)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">The sum of both numbers is: 22
</code></pre>
<p>Here:</p>
<pre><code class="language-python">string = "15"
</code></pre>
<p>is a string.</p>
<p>We explicitly convert it to an integer using:</p>
<pre><code class="language-python">string_number = int(string)
</code></pre>
<p>Now the addition can be performed between two integers.</p>
<h3>Important</h3>
<p>The string must contain a valid integer representation.</p>
<p>For example:</p>
<pre><code class="language-python">int("15")
</code></pre>
<p>works, but:</p>
<pre><code class="language-python">int("hello")
</code></pre>
<p>raises a <code>ValueError</code>.</p>
<p>Similarly:</p>
<pre><code class="language-python">int("15.5")
</code></pre>
<p>also raises a <code>ValueError</code> because <code>"15.5"</code> is not a valid integer literal for <code>int()</code>.</p>
<hr />
<h2>Common Explicit Conversions</h2>
<h3>String to Integer</h3>
<pre><code class="language-python">a = "10"
b = int(a)

print(b)
print(type(b))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">10
&lt;class 'int'&gt;
</code></pre>
<h3>Integer to Float</h3>
<pre><code class="language-python">a = 10
b = float(a)

print(b)
print(type(b))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">10.0
&lt;class 'float'&gt;
</code></pre>
<h3>Integer to String</h3>
<pre><code class="language-python">a = 100
b = str(a)

print(b)
print(type(b))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">100
&lt;class 'str'&gt;
</code></pre>
<hr />
<h1>2. Implicit Type Conversion</h1>
<p><strong>Implicit type conversion</strong> happens when Python automatically converts a value to another compatible type during an operation.</p>
<p>For example:</p>
<pre><code class="language-python">a = 7
b = 3.0

c = a + b

print(c)
print(type(c))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">10.0
&lt;class 'float'&gt;
</code></pre>
<p>Here:</p>
<ul>
<li><p><code>a</code> is an <code>int</code>.</p>
</li>
<li><p><code>b</code> is a <code>float</code>.</p>
</li>
<li><p>Python converts the integer value <code>7</code> to a floating-point value for the addition.</p>
</li>
<li><p>The result is a <code>float</code>.</p>
</li>
</ul>
<p>Conceptually:</p>
<pre><code class="language-text">7 + 3.0
↓
7.0 + 3.0
↓
10.0
</code></pre>
<p>This happens automatically, so we do not need to call <code>float()</code> ourselves.</p>
<hr />
<h2>Why Does Python Do This?</h2>
<p>Python performs certain automatic conversions when doing so is appropriate and does not require losing information.</p>
<p>For example:</p>
<pre><code class="language-python">a = 7
b = 3.0

print(a + b)
</code></pre>
<p>produces:</p>
<pre><code class="language-text">10.0
</code></pre>
<p>The result is a float because the operation involves a floating-point value.</p>
<p>However, Python does <strong>not</strong> automatically convert unrelated types in every situation.</p>
<p>For example:</p>
<pre><code class="language-python">a = "1"
b = 2

print(a + b)
</code></pre>
<p>This raises a <code>TypeError</code>.</p>
<p>Python does not automatically convert <code>"1"</code> into <code>1</code>.</p>
<p>We must explicitly convert it:</p>
<pre><code class="language-python">a = "1"
b = 2

print(int(a) + b)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">3
</code></pre>
<hr />
<h1>Explicit vs Implicit Type Conversion</h1>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Explicit Conversion</th>
<th>Implicit Conversion</th>
</tr>
</thead>
<tbody><tr>
<td>Who performs it?</td>
<td>Programmer</td>
<td>Python</td>
</tr>
<tr>
<td>Also called</td>
<td>Type casting</td>
<td>Automatic type conversion</td>
</tr>
<tr>
<td>Requires conversion function?</td>
<td>Usually</td>
<td>No</td>
</tr>
<tr>
<td>Example</td>
<td><code>int("10")</code></td>
<td><code>10 + 2.5</code></td>
</tr>
<tr>
<td>Control</td>
<td>Programmer controls the conversion</td>
<td>Python performs the conversion</td>
</tr>
</tbody></table>
<hr />
<h1>Important Examples</h1>
<h3>Example 1: Strings</h3>
<pre><code class="language-python">a = "1"
b = "2"

print(a + b)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">12
</code></pre>
<p>Why?</p>
<p>Both values are strings, so <code>+</code> performs <strong>string concatenation</strong>.</p>
<p>It does not perform numerical addition.</p>
<h3>Example 2: Explicit Conversion</h3>
<pre><code class="language-python">a = "1"
b = "2"

print(int(a) + int(b))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">3
</code></pre>
<p>Here we explicitly convert both strings into integers.</p>
<h3>Example 3: Implicit Conversion</h3>
<pre><code class="language-python">c = 1.9
d = 8

print(c + d)
print(type(c + d))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">9.9
&lt;class 'float'&gt;
</code></pre>
<p>Python automatically handles the integer and float combination, producing a float result.</p>
<hr />
<h1>Key Takeaways</h1>
<ol>
<li><p><strong>Type casting</strong> means converting a value from one data type to another.</p>
</li>
<li><p><strong>Explicit conversion</strong> is performed manually by the programmer.</p>
</li>
<li><p>Functions such as <code>int()</code>, <code>float()</code>, and <code>str()</code> are commonly used for explicit conversion.</p>
</li>
<li><p><strong>Implicit conversion</strong> is performed automatically by Python in certain compatible operations.</p>
</li>
<li><p><code>"1" + "2"</code> produces <code>"12"</code> because both values are strings.</p>
</li>
<li><p><code>int("1") + int("2")</code> produces <code>3</code>.</p>
</li>
<li><p><code>1 + 2.5</code> produces <code>3.5</code> because the integer participates in a floating-point operation.</p>
</li>
<li><p>Python does not automatically convert unrelated types such as <code>str</code> and <code>int</code> during <code>+</code>.</p>
</li>
<li><p>Type conversion is important when working with user input, calculations, files, APIs, and data processing.</p>
</li>
</ol>
<hr />
<h2>Quick Revision</h2>
<pre><code class="language-text">Type Casting
│
├── Explicit Conversion
│   ├── int()
│   ├── float()
│   ├── str()
│   ├── list()
│   ├── tuple()
│   └── set()
│
└── Implicit Conversion
    └── Python automatically performs
        certain compatible conversions
</code></pre>
<h3>Remember</h3>
<pre><code class="language-python">"1" + "2"          # "12"
int("1") + int("2") # 3
1 + 2.5            # 3.5
</code></pre>
<p>Type casting becomes especially useful when handling values coming from sources such as <code>input()</code>, files, APIs, databases, and user-entered data.</p>
<hr />
<h2><strong>📂 Day 9 Resources</strong></h2>
<p>All notes and code for this day are available in the GitHub repository:</p>
<p><a class="embed-card" href="https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/09-Day09-Typecasting-in-Python">https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/09-Day09-Typecasting-in-Python</a></p>

<hr />
]]></content:encoded></item><item><title><![CDATA[Day 8 – Exercise 1 Solution: Creating a Calculator with Python Operators]]></title><description><![CDATA[Welcome to Day 8 of 100 Days of Python!
In Day 7, I was given my first Python exercise:

Create a calculator capable of performing addition, subtraction, multiplication, and division on two numbers an]]></description><link>https://sritesh-tech-journal.hashnode.dev/day-8-exercise-1-solution-creating-a-calculator-with-python-operators</link><guid isPermaLink="true">https://sritesh-tech-journal.hashnode.dev/day-8-exercise-1-solution-creating-a-calculator-with-python-operators</guid><category><![CDATA[100 days of python	]]></category><category><![CDATA[Python]]></category><category><![CDATA[Python 3]]></category><dc:creator><![CDATA[SRITESH SURANJAN]]></dc:creator><pubDate>Sun, 13 Sep 2026 04:54:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/8154623f-308a-461a-ab44-c02f9be2ba89.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<img src="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/9a71bb0b-9467-48b4-b81f-b4df812fb24c.jpg" alt="" style="display:block;margin:0 auto" />

<p>Welcome to <strong>Day 8 of 100 Days of Python!</strong></p>
<p>In Day 7, I was given my first Python exercise:</p>
<blockquote>
<p>Create a calculator capable of performing addition, subtraction, multiplication, and division on two numbers and display the output in a readable format.</p>
</blockquote>
<p>Today, we will look at the <strong>solution</strong> and understand how the program works.</p>
<p>The calculator uses variables, arithmetic operators, and the <code>print()</code> function.</p>
<hr />
<h1>1. The Calculator</h1>
<p>Here is the solution:</p>
<pre><code class="language-python">a = 7
b = 3

print("Addition of", a, "and", b, "is:", a + b)
print("Subtraction of", a, "and", b, "is:", a - b)
print("Multiplication of", a, "and", b, "is:", a * b)
print("Division of", a, "and", b, "is:", a / b)

print("Floor Division of", a, "and", b, "is:", a // b)
print("Modulus of", a, "and", b, "is:", a % b)
print("Exponentiation of", a, "and", b, "is:", a ** b)
</code></pre>
<hr />
<h1>2. Understanding the Variables</h1>
<p>First, we create two variables:</p>
<pre><code class="language-python">a = 7
b = 3
</code></pre>
<p>Here:</p>
<ul>
<li><p><code>a</code> stores the value <code>7</code></p>
</li>
<li><p><code>b</code> stores the value <code>3</code></p>
</li>
</ul>
<p>These two variables are used as the operands for our calculations.</p>
<hr />
<h1>3. Addition</h1>
<pre><code class="language-python">print("Addition of", a, "and", b, "is:", a + b)
</code></pre>
<p>The <code>+</code> operator performs addition.</p>
<p>Since:</p>
<pre><code class="language-text">7 + 3 = 10
</code></pre>
<p>The output is:</p>
<pre><code class="language-text">Addition of 7 and 3 is: 10
</code></pre>
<hr />
<h1>4. Subtraction</h1>
<pre><code class="language-python">print("Subtraction of", a, "and", b, "is:", a - b)
</code></pre>
<p>The <code>-</code> operator performs subtraction.</p>
<pre><code class="language-text">7 - 3 = 4
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Subtraction of 7 and 3 is: 4
</code></pre>
<hr />
<h1>5. Multiplication</h1>
<pre><code class="language-python">print("Multiplication of", a, "and", b, "is:", a * b)
</code></pre>
<p>The <code>*</code> operator performs multiplication.</p>
<pre><code class="language-text">7 × 3 = 21
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Multiplication of 7 and 3 is: 21
</code></pre>
<p>In Python, multiplication is written using <code>*</code>.</p>
<hr />
<h1>6. Division</h1>
<pre><code class="language-python">print("Division of", a, "and", b, "is:", a / b)
</code></pre>
<p>The <code>/</code> operator performs regular division.</p>
<pre><code class="language-text">7 / 3 = 2.3333333333333335
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Division of 7 and 3 is: 2.3333333333333335
</code></pre>
<p>Python returns a floating-point value when using <code>/</code>.</p>
<hr />
<h1>7. Floor Division</h1>
<p>Although floor division was not one of the four required operations in the original exercise, I also included it for additional practice.</p>
<pre><code class="language-python">print("Floor Division of", a, "and", b, "is:", a // b)
</code></pre>
<p>The <code>//</code> operator performs floor division.</p>
<pre><code class="language-text">7 // 3 = 2
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Floor Division of 7 and 3 is: 2
</code></pre>
<hr />
<h1>8. Modulus</h1>
<p>The <code>%</code> operator returns the remainder after division.</p>
<pre><code class="language-python">print("Modulus of", a, "and", b, "is:", a % b)
</code></pre>
<p>Since:</p>
<pre><code class="language-text">7 ÷ 3 = 2 remainder 1
</code></pre>
<p>We get:</p>
<pre><code class="language-text">7 % 3 = 1
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Modulus of 7 and 3 is: 1
</code></pre>
<hr />
<h1>9. Exponentiation</h1>
<p>The <code>**</code> operator performs exponentiation.</p>
<pre><code class="language-python">print("Exponentiation of", a, "and", b, "is:", a ** b)
</code></pre>
<p>This means:</p>
<pre><code class="language-text">7 ** 3
= 7 × 7 × 7
= 343
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Exponentiation of 7 and 3 is: 343
</code></pre>
<hr />
<h1>10. Complete Output</h1>
<p>When the complete program is executed, the output will be:</p>
<pre><code class="language-text">Addition of 7 and 3 is: 10
Subtraction of 7 and 3 is: 4
Multiplication of 7 and 3 is: 21
Division of 7 and 3 is: 2.3333333333333335
Floor Division of 7 and 3 is: 2
Modulus of 7 and 3 is: 1
Exponentiation of 7 and 3 is: 343
</code></pre>
<hr />
<h1>11. What We Used</h1>
<p>This small calculator combines several concepts learned in the previous days.</p>
<h3>Variables</h3>
<pre><code class="language-python">a = 7
b = 3
</code></pre>
<p>Variables store the values that we want to use.</p>
<h3>Arithmetic Operators</h3>
<pre><code class="language-text">+   Addition
-   Subtraction
*   Multiplication
/   Division
//  Floor Division
%   Modulus
**  Exponentiation
</code></pre>
<h3><code>print()</code></h3>
<p>The <code>print()</code> function displays the operation and its result in a readable format.</p>
<p>For example:</p>
<pre><code class="language-python">print("Addition of", a, "and", b, "is:", a + b)
</code></pre>
<p>This combines text, variables, and an arithmetic expression in one statement.</p>
<hr />
<h1>12. Exercise Completed</h1>
<p>The original exercise required:</p>
<ul>
<li><p>Addition</p>
</li>
<li><p>Subtraction</p>
</li>
<li><p>Multiplication</p>
</li>
<li><p>Division</p>
</li>
<li><p>Readable output</p>
</li>
</ul>
<p>The solution successfully performs all four required operations.</p>
<p>I also added:</p>
<ul>
<li><p>Floor Division</p>
</li>
<li><p>Modulus</p>
</li>
<li><p>Exponentiation</p>
</li>
</ul>
<p>as additional practice with the arithmetic operators learned in Day 7.</p>
<hr />
<h1>13. Quick Revision</h1>
<table>
<thead>
<tr>
<th>Operation</th>
<th>Python Operator</th>
<th>Example</th>
<th>Result</th>
</tr>
</thead>
<tbody><tr>
<td>Addition</td>
<td><code>+</code></td>
<td><code>7 + 3</code></td>
<td><code>10</code></td>
</tr>
<tr>
<td>Subtraction</td>
<td><code>-</code></td>
<td><code>7 - 3</code></td>
<td><code>4</code></td>
</tr>
<tr>
<td>Multiplication</td>
<td><code>*</code></td>
<td><code>7 * 3</code></td>
<td><code>21</code></td>
</tr>
<tr>
<td>Division</td>
<td><code>/</code></td>
<td><code>7 / 3</code></td>
<td><code>2.333...</code></td>
</tr>
<tr>
<td>Floor Division</td>
<td><code>//</code></td>
<td><code>7 // 3</code></td>
<td><code>2</code></td>
</tr>
<tr>
<td>Modulus</td>
<td><code>%</code></td>
<td><code>7 % 3</code></td>
<td><code>1</code></td>
</tr>
<tr>
<td>Exponentiation</td>
<td><code>**</code></td>
<td><code>7 ** 3</code></td>
<td><code>343</code></td>
</tr>
</tbody></table>
<hr />
<h1>14. Key Takeaways</h1>
<p>After completing this exercise, I can now:</p>
<ul>
<li><p>Store numbers in variables</p>
</li>
<li><p>Perform basic arithmetic operations</p>
</li>
<li><p>Use Python arithmetic operators</p>
</li>
<li><p>Combine variables and operators in expressions</p>
</li>
<li><p>Display calculation results using <code>print()</code></p>
</li>
<li><p>Format output so that it is easier to read</p>
</li>
<li><p>Understand the difference between <code>/</code> and <code>//</code></p>
</li>
<li><p>Understand how <code>%</code> returns a remainder</p>
</li>
<li><p>Use <code>**</code> for exponentiation</p>
</li>
</ul>
<p>This is a very small program, but it is an important first step toward building larger Python programs.</p>
<p><strong>Day 7 gave me the problem. Day 8 gave me the solution.</strong></p>
<p>The next step is to keep building on these fundamentals and gradually make the programs more interactive and useful.</p>
<hr />
<h2><strong>📂 Day 8 Resources</strong></h2>
<p>All notes and code for this day are available in the GitHub repository:</p>
<p><a class="embed-card" href="https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/08-Day8-Exercise-1-Create-a-Calculator-Solution">https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/08-Day8-Exercise-1-Create-a-Calculator-Solution</a></p>

<hr />
]]></content:encoded></item><item><title><![CDATA[Day 7 – Exercise 1: Create a Calculator in Python]]></title><description><![CDATA[Welcome to Day 7 of 100 Days of Python!
Today is our first exercise day.
Instead of learning a completely new concept, we will apply what we have learned so far to understand Python operators and buil]]></description><link>https://sritesh-tech-journal.hashnode.dev/day-7-exercise-1-create-a-calculator-in-python</link><guid isPermaLink="true">https://sritesh-tech-journal.hashnode.dev/day-7-exercise-1-create-a-calculator-in-python</guid><category><![CDATA[100 days of python	]]></category><category><![CDATA[Python]]></category><category><![CDATA[Python 3]]></category><dc:creator><![CDATA[SRITESH SURANJAN]]></dc:creator><pubDate>Sat, 12 Sep 2026 07:35:51 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/316da95d-c98f-4d23-a2a5-5716788dc6e4.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<img src="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/67cb27ad-d404-48bc-84fe-f23b373d9371.jpg" alt="" style="display:block;margin:0 auto" />

<p>Welcome to <strong>Day 7 of 100 Days of Python!</strong></p>
<p>Today is our <strong>first exercise day</strong>.</p>
<p>Instead of learning a completely new concept, we will apply what we have learned so far to understand <strong>Python operators</strong> and build the logic for a simple calculator.</p>
<p>The goal is to practice arithmetic operations and become comfortable with writing expressions in Python.</p>
<blockquote>
<p><strong>Note:</strong> The complete calculator solution is intentionally not provided today. The solution will be covered in a later day.</p>
</blockquote>
<hr />
<h1>1. Python Operators</h1>
<p>An <strong>operator</strong> is a symbol or keyword that tells Python to perform an operation on one or more values.</p>
<p>For example:</p>
<pre><code class="language-python">5 + 6
</code></pre>
<p>Here:</p>
<ul>
<li><p><code>5</code> and <code>6</code> are operands</p>
</li>
<li><p><code>+</code> is the operator</p>
</li>
<li><p>The result is <code>11</code></p>
</li>
</ul>
<p>Python provides different types of operators for different purposes.</p>
<p>Some common categories include:</p>
<ul>
<li><p>Arithmetic operators</p>
</li>
<li><p>Comparison operators</p>
</li>
<li><p>Assignment operators</p>
</li>
<li><p>Logical operators</p>
</li>
<li><p>Identity operators</p>
</li>
<li><p>Membership operators</p>
</li>
<li><p>Bitwise operators</p>
</li>
</ul>
<p>Today, we are focusing on <strong>arithmetic operators</strong>.</p>
<hr />
<h1>2. Arithmetic Operators</h1>
<p>Arithmetic operators are used to perform mathematical operations.</p>
<table>
<thead>
<tr>
<th>Operator</th>
<th>Name</th>
<th>Example</th>
<th>Result</th>
</tr>
</thead>
<tbody><tr>
<td><code>+</code></td>
<td>Addition</td>
<td><code>15 + 7</code></td>
<td><code>22</code></td>
</tr>
<tr>
<td><code>-</code></td>
<td>Subtraction</td>
<td><code>15 - 7</code></td>
<td><code>8</code></td>
</tr>
<tr>
<td><code>*</code></td>
<td>Multiplication</td>
<td><code>5 * 7</code></td>
<td><code>35</code></td>
</tr>
<tr>
<td><code>**</code></td>
<td>Exponentiation</td>
<td><code>5 ** 3</code></td>
<td><code>125</code></td>
</tr>
<tr>
<td><code>/</code></td>
<td>Division</td>
<td><code>5 / 3</code></td>
<td><code>1.666...</code></td>
</tr>
<tr>
<td><code>%</code></td>
<td>Modulus</td>
<td><code>15 % 7</code></td>
<td><code>1</code></td>
</tr>
<tr>
<td><code>//</code></td>
<td>Floor Division</td>
<td><code>15 // 7</code></td>
<td><code>2</code></td>
</tr>
</tbody></table>
<p>Let's understand each one.</p>
<hr />
<h2>2.1 Addition – <code>+</code></h2>
<p>The <code>+</code> operator adds two values.</p>
<pre><code class="language-python">15 + 7
</code></pre>
<p>Result:</p>
<pre><code class="language-text">22
</code></pre>
<p>Example:</p>
<pre><code class="language-python">a = 15
b = 7

print(a + b)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">22
</code></pre>
<hr />
<h2>2.2 Subtraction – <code>-</code></h2>
<p>The <code>-</code> operator subtracts the second value from the first.</p>
<pre><code class="language-python">15 - 7
</code></pre>
<p>Result:</p>
<pre><code class="language-text">8
</code></pre>
<hr />
<h2>2.3 Multiplication – <code>*</code></h2>
<p>The <code>*</code> operator multiplies two values.</p>
<pre><code class="language-python">5 * 7
</code></pre>
<p>Result:</p>
<pre><code class="language-text">35
</code></pre>
<hr />
<h2>2.4 Exponentiation – <code>**</code></h2>
<p>The <code>**</code> operator raises one number to the power of another.</p>
<pre><code class="language-python">5 ** 3
</code></pre>
<p>This means:</p>
<pre><code class="language-text">5 × 5 × 5
</code></pre>
<p>Result:</p>
<pre><code class="language-text">125
</code></pre>
<p>In Python, the correct name is <strong>exponentiation</strong>.</p>
<hr />
<h2>2.5 Division – <code>/</code></h2>
<p>The <code>/</code> operator performs division.</p>
<pre><code class="language-python">15 / 7
</code></pre>
<p>Result:</p>
<pre><code class="language-text">2.142857142857143
</code></pre>
<p>Python's <code>/</code> operator returns a floating-point result.</p>
<p>For example:</p>
<pre><code class="language-python">15 / 5
</code></pre>
<p>Output:</p>
<pre><code class="language-text">3.0
</code></pre>
<p>Notice that the result is <code>3.0</code>, not <code>3</code>.</p>
<hr />
<h2>2.6 Modulus – <code>%</code></h2>
<p>The <code>%</code> operator returns the <strong>remainder</strong> after division.</p>
<pre><code class="language-python">15 % 7
</code></pre>
<p>7 goes into 15 two times, leaving a remainder of 1.</p>
<p>Therefore:</p>
<pre><code class="language-text">15 % 7 = 1
</code></pre>
<p>Example:</p>
<pre><code class="language-python">print(15 % 7)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">1
</code></pre>
<p>The modulus operator is particularly useful when working with things such as:</p>
<ul>
<li><p>Even and odd numbers</p>
</li>
<li><p>Cycles</p>
</li>
<li><p>Remainders</p>
</li>
<li><p>Divisibility checks</p>
</li>
</ul>
<p>We will use it much more in later exercises.</p>
<hr />
<h2>2.7 Floor Division – <code>//</code></h2>
<p>The <code>//</code> operator performs division and returns the <strong>floor</strong> of the result.</p>
<p>For positive numbers:</p>
<pre><code class="language-python">15 // 7
</code></pre>
<p>The normal division is approximately:</p>
<pre><code class="language-text">2.142857...
</code></pre>
<p>Floor division gives:</p>
<pre><code class="language-text">2
</code></pre>
<p>Example:</p>
<pre><code class="language-python">print(15 // 7)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">2
</code></pre>
<blockquote>
<p><strong>Important:</strong> Floor division is not simply "division without decimals" for every possible value. It returns the mathematical floor of the division result, which is especially important when negative numbers are involved.</p>
</blockquote>
<hr />
<h1>3. Understanding the Exercise</h1>
<h2>Exercise 1 – Create a Calculator</h2>
<p>Create a calculator capable of performing:</p>
<ul>
<li><p>Addition</p>
</li>
<li><p>Subtraction</p>
</li>
<li><p>Multiplication</p>
</li>
<li><p>Division</p>
</li>
</ul>
<p>The program should work with <strong>two numbers</strong> and display the results in a readable format.</p>
<p>For example, if the two numbers are:</p>
<pre><code class="language-python">n = 15
m = 7
</code></pre>
<p>You should calculate:</p>
<pre><code class="language-python">n + m
n - m
n * m
n / m
</code></pre>
<p>The output should clearly tell the user which operation was performed.</p>
<hr />
<h1>4. Understanding the Provided Example</h1>
<p>A basic example of the required logic is:</p>
<pre><code class="language-python">n = 15
m = 7

ans1 = n + m
print("Addition of", n, "and", m, "is", ans1)

ans2 = n - m
print("Subtraction of", n, "and", m, "is", ans2)

ans3 = n * m
print("Multiplication of", n, "and", m, "is", ans3)

ans4 = n / m
print("Division of", n, "and", m, "is", ans4)

ans5 = n % m
print("Modulus of", n, "and", m, "is", ans5)

ans6 = n // m
print("Floor Division of", n, "and", m, "is", ans6)
</code></pre>
<p>Here:</p>
<ul>
<li><p><code>n</code> and <code>m</code> are variables containing the two numbers.</p>
</li>
<li><p><code>ans1</code> stores the addition result.</p>
</li>
<li><p><code>ans2</code> stores the subtraction result.</p>
</li>
<li><p><code>ans3</code> stores the multiplication result.</p>
</li>
<li><p><code>ans4</code> stores the division result.</p>
</li>
<li><p><code>ans5</code> stores the modulus result.</p>
</li>
<li><p><code>ans6</code> stores the floor-division result.</p>
</li>
</ul>
<p>This is an example of breaking a calculation into multiple steps.</p>
<hr />
<h1>5. Your Exercise</h1>
<p>Now try creating the calculator yourself.</p>
<p>Start with two numbers:</p>
<pre><code class="language-python">n = 15
m = 7
</code></pre>
<p>Then calculate:</p>
<pre><code class="language-text">Addition
Subtraction
Multiplication
Division
</code></pre>
<p>Try to format the output so that it is easy to understand.</p>
<h3>Challenge</h3>
<p>Before looking at a solution, try answering these questions:</p>
<ol>
<li><p>Which operator is used for addition?</p>
</li>
<li><p>Which operator is used for multiplication?</p>
</li>
<li><p>What is the difference between <code>/</code> and <code>//</code>?</p>
</li>
<li><p>What does <code>%</code> return?</p>
</li>
<li><p>What does <code>**</code> do?</p>
</li>
<li><p>Can you store each result in a separate variable?</p>
</li>
<li><p>Can you print the result in a readable sentence?</p>
</li>
</ol>
<hr />
<h1>6. Operator Practice</h1>
<p>The following expressions are included in today's practice program:</p>
<pre><code class="language-python">print(5 + 6)
print(15 - 6)
print(15 * 6)
print(15 / 6)
print(15 // 6)
print(5 % 3)
print(2 ** 4)
</code></pre>
<p>Their results are:</p>
<pre><code class="language-text">11
9
90
2.5
2
2
16
</code></pre>
<p>Try predicting the output <strong>before running the program</strong>.</p>
<p>This is a simple but effective way to improve your understanding of operators.</p>
<hr />
<h1>7. Quick Revision</h1>
<table>
<thead>
<tr>
<th>Operator</th>
<th>Operation</th>
<th>Example</th>
</tr>
</thead>
<tbody><tr>
<td><code>+</code></td>
<td>Addition</td>
<td><code>5 + 3</code></td>
</tr>
<tr>
<td><code>-</code></td>
<td>Subtraction</td>
<td><code>5 - 3</code></td>
</tr>
<tr>
<td><code>*</code></td>
<td>Multiplication</td>
<td><code>5 * 3</code></td>
</tr>
<tr>
<td><code>/</code></td>
<td>Division</td>
<td><code>5 / 3</code></td>
</tr>
<tr>
<td><code>//</code></td>
<td>Floor Division</td>
<td><code>5 // 3</code></td>
</tr>
<tr>
<td><code>%</code></td>
<td>Modulus</td>
<td><code>5 % 3</code></td>
</tr>
<tr>
<td><code>**</code></td>
<td>Exponentiation</td>
<td><code>5 ** 3</code></td>
</tr>
</tbody></table>
<p>Remember:</p>
<pre><code class="language-text">/   → Division
//  → Floor Division
%   → Remainder
**  → Power
</code></pre>
<hr />
<h1>8. What I Learned Today</h1>
<p>Day 7 was mainly about <strong>practice rather than new theory</strong>.</p>
<p>Today I learned:</p>
<ul>
<li><p>What operators are</p>
</li>
<li><p>What arithmetic operators are</p>
</li>
<li><p>How to perform addition</p>
</li>
<li><p>How to perform subtraction</p>
</li>
<li><p>How to perform multiplication</p>
</li>
<li><p>How to perform division</p>
</li>
<li><p>How to calculate a remainder using <code>%</code></p>
</li>
<li><p>How to perform floor division using <code>//</code></p>
</li>
<li><p>How to calculate powers using <code>**</code></p>
</li>
<li><p>How arithmetic expressions can be used to build the logic of a calculator</p>
</li>
</ul>
<p>Most importantly, I practiced applying variables, <code>print()</code>, and arithmetic operators together.</p>
<hr />
<h1>9. Exercise Status</h1>
<p><strong>Exercise:</strong> Create a Calculator</p>
<p><strong>Status:</strong> 🟡 Attempted / Practice</p>
<p>The complete solution is intentionally not included in this day's code.</p>
<p>I will revisit this exercise in a later day and build upon what I have learned.</p>
<hr />
<h2>Final Note</h2>
<p>A calculator may look like a very small program, but it introduces an important programming habit:</p>
<blockquote>
<p><strong>Learn a concept → practice it → build something with it.</strong></p>
</blockquote>
<p>That is the approach I want to follow throughout these 100 Days of Python.</p>
<hr />
<h2><strong>📂 Day 7 Resources</strong></h2>
<p>All notes and code for this day are available in the GitHub repository:</p>
<p><a class="embed-card" href="https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/07-Day07-Exercise-1-Create-a-Calculator">https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/07-Day07-Exercise-1-Create-a-Calculator</a></p>

<hr />
]]></content:encoded></item><item><title><![CDATA[Day 6 – Python Variables and Data Types]]></title><description><![CDATA[Welcome to Day 6 of 100 Days of Python!
Today, we are learning two of the most fundamental concepts in programming:

Variables

Data Types


Whenever we write a Python program, we work with different ]]></description><link>https://sritesh-tech-journal.hashnode.dev/day-6-python-variables-and-data-types</link><guid isPermaLink="true">https://sritesh-tech-journal.hashnode.dev/day-6-python-variables-and-data-types</guid><category><![CDATA[100 days of python	]]></category><category><![CDATA[Python]]></category><category><![CDATA[Python 3]]></category><dc:creator><![CDATA[SRITESH SURANJAN]]></dc:creator><pubDate>Sat, 12 Sep 2026 07:32:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/665bc740-272c-4317-97e1-33119fd2dc48.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<img src="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/c3fb105b-69c9-4171-9059-bd8d8f7555c5.jpg" alt="" style="display:block;margin:0 auto" />

<p>Welcome to <strong>Day 6 of 100 Days of Python!</strong></p>
<p>Today, we are learning two of the most fundamental concepts in programming:</p>
<ul>
<li><p>Variables</p>
</li>
<li><p>Data Types</p>
</li>
</ul>
<p>Whenever we write a Python program, we work with different kinds of values such as numbers, text, <code>True</code>/<code>False</code>, collections, and more. Variables give these values names, while data types tell Python what kind of values they are.</p>
<hr />
<h1>1. What is a Variable?</h1>
<p>A <strong>variable</strong> is a name that refers to a value or object in a Python program.</p>
<p>You can think of a variable as a label attached to some data.</p>
<p>For example:</p>
<pre><code class="language-python">a = 1
b = True
c = "Sritesh"
d = None
</code></pre>
<p>Here:</p>
<ul>
<li><p><code>a</code> refers to the integer <code>1</code></p>
</li>
<li><p><code>b</code> refers to the Boolean value <code>True</code></p>
</li>
<li><p><code>c</code> refers to the string <code>"Sritesh"</code></p>
</li>
<li><p><code>d</code> refers to <code>None</code></p>
</li>
</ul>
<p>Python variables do not need their data type to be declared explicitly.</p>
<p>For example:</p>
<pre><code class="language-python">age = 23
name = "Sritesh"
height = 5.5
</code></pre>
<p>Python automatically determines the type of each value.</p>
<hr />
<h1>2. Creating Variables</h1>
<p>Creating a variable in Python is simple.</p>
<p>The general syntax is:</p>
<pre><code class="language-python">variable_name = value
</code></pre>
<p>Example:</p>
<pre><code class="language-python">name = "Sritesh"
age = 23
is_learning = True
</code></pre>
<p>The <code>=</code> symbol is called the <strong>assignment operator</strong>.</p>
<p>It assigns the value on the right to the variable name on the left.</p>
<p>For example:</p>
<pre><code class="language-python">age = 23
</code></pre>
<p>means that <code>age</code> now refers to the value <code>23</code>.</p>
<hr />
<h1>3. What is a Data Type?</h1>
<p>A <strong>data type</strong> describes the kind of value an object represents.</p>
<p>Different types of data support different operations.</p>
<p>For example:</p>
<pre><code class="language-python">a = 10
b = 20

print(a + b)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">30
</code></pre>
<p>Here, <code>a</code> and <code>b</code> are integers, so addition performs numerical addition.</p>
<p>Now consider:</p>
<pre><code class="language-python">a = "10"
b = "20"

print(a + b)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">1020
</code></pre>
<p>Here, <code>a</code> and <code>b</code> are strings, so <code>+</code> joins the strings together.</p>
<p>This is why understanding data types is important.</p>
<hr />
<h1>4. Checking the Type of a Value</h1>
<p>Python provides the built-in <code>type()</code> function to check the type of an object.</p>
<p>Example:</p>
<pre><code class="language-python">a = 10
print(type(a))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">&lt;class 'int'&gt;
</code></pre>
<p>Another example:</p>
<pre><code class="language-python">name = "Sritesh"
print(type(name))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">&lt;class 'str'&gt;
</code></pre>
<p>The <code>type()</code> function is extremely useful while learning Python and debugging programs.</p>
<hr />
<h1>5. Common Built-in Data Types</h1>
<p>Python provides several built-in data types.</p>
<p>Some important ones are:</p>
<table>
<thead>
<tr>
<th>Category</th>
<th>Data Types</th>
</tr>
</thead>
<tbody><tr>
<td>Numeric</td>
<td><code>int</code>, <code>float</code>, <code>complex</code></td>
</tr>
<tr>
<td>Text</td>
<td><code>str</code></td>
</tr>
<tr>
<td>Boolean</td>
<td><code>bool</code></td>
</tr>
<tr>
<td>Sequence</td>
<td><code>list</code>, <code>tuple</code>, <code>range</code></td>
</tr>
<tr>
<td>Mapping</td>
<td><code>dict</code></td>
</tr>
<tr>
<td>Set</td>
<td><code>set</code>, <code>frozenset</code></td>
</tr>
<tr>
<td>Binary</td>
<td><code>bytes</code>, <code>bytearray</code>, <code>memoryview</code></td>
</tr>
<tr>
<td>None</td>
<td><code>NoneType</code></td>
</tr>
</tbody></table>
<p>In this lesson, we will focus on the types introduced in this day's program.</p>
<hr />
<h1>6. Numeric Data Types</h1>
<p>Python has three built-in numeric types:</p>
<ul>
<li><p><code>int</code></p>
</li>
<li><p><code>float</code></p>
</li>
<li><p><code>complex</code></p>
</li>
</ul>
<h2><code>int</code></h2>
<p><code>int</code> represents whole numbers.</p>
<p>Examples:</p>
<pre><code class="language-python">a = 10
b = -8
c = 0
</code></pre>
<p>These are all integers.</p>
<p>You can perform mathematical operations on integers:</p>
<pre><code class="language-python">a = 10
b = 5

print(a + b)
print(a - b)
print(a * b)
</code></pre>
<hr />
<h2><code>float</code></h2>
<p><code>float</code> represents numbers containing a decimal point.</p>
<p>Examples:</p>
<pre><code class="language-python">a = 7.349
b = -9.0
c = 0.0000001
</code></pre>
<p>You can check its type:</p>
<pre><code class="language-python">a = 7.5
print(type(a))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">&lt;class 'float'&gt;
</code></pre>
<hr />
<h2><code>complex</code></h2>
<p>Python also supports complex numbers.</p>
<p>A complex number contains:</p>
<ul>
<li><p>A real part</p>
</li>
<li><p>An imaginary part</p>
</li>
</ul>
<p>Python uses <code>j</code> to represent the imaginary part.</p>
<p>For example:</p>
<pre><code class="language-python">a = 1 + 2j
</code></pre>
<p>or:</p>
<pre><code class="language-python">a = complex(1, 2)
</code></pre>
<p>Both represent the same complex number.</p>
<pre><code class="language-python">print(a)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">(1+2j)
</code></pre>
<blockquote>
<p><strong>Note:</strong> In Python, use <code>j</code>, not <code>i</code>, for the imaginary part.</p>
</blockquote>
<hr />
<h1>7. Text Data – <code>str</code></h1>
<p>The <code>str</code> type is used to represent text.</p>
<p>Strings can be written using single or double quotes.</p>
<pre><code class="language-python">name = "Sritesh"
language = 'Python'
</code></pre>
<p>You can also store sentences:</p>
<pre><code class="language-python">message = "I am learning Python."
</code></pre>
<p>Check the type:</p>
<pre><code class="language-python">print(type(message))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">&lt;class 'str'&gt;
</code></pre>
<hr />
<h1>8. Boolean Data Type – <code>bool</code></h1>
<p>The Boolean data type has only two possible values:</p>
<pre><code class="language-python">True
False
</code></pre>
<p>Example:</p>
<pre><code class="language-python">is_learning = True
is_sleeping = False
</code></pre>
<p>Booleans are commonly used when making decisions in programs.</p>
<p>For example:</p>
<pre><code class="language-python">age = 23
can_vote = age &gt;= 18

print(can_vote)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">True
</code></pre>
<blockquote>
<p>Remember: <code>True</code> and <code>False</code> must begin with a capital letter.</p>
</blockquote>
<hr />
<h1>9. <code>NoneType</code> – <code>None</code></h1>
<p>Python has a special value called <code>None</code>.</p>
<p>It represents the <strong>absence of a value</strong> or a value that is currently not available.</p>
<p>Example:</p>
<pre><code class="language-python">result = None

print(result)
print(type(result))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">None
&lt;class 'NoneType'&gt;
</code></pre>
<p><code>None</code> is different from:</p>
<ul>
<li><p><code>0</code></p>
</li>
<li><p><code>False</code></p>
</li>
<li><p><code>""</code></p>
</li>
</ul>
<p>It specifically represents the absence of a value.</p>
<hr />
<h1>10. Sequence Data Types</h1>
<p>Python provides several sequence types.</p>
<p>In this lesson, we will look at:</p>
<ul>
<li><p><code>list</code></p>
</li>
<li><p><code>tuple</code></p>
</li>
</ul>
<hr />
<h2>List</h2>
<p>A <strong>list</strong> is an ordered, mutable collection of items.</p>
<p>Lists are written using square brackets <code>[]</code>.</p>
<p>Example:</p>
<pre><code class="language-python">list1 = [8, 2.3, [-4, 5], ["apple", "banana"]]

print(list1)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">[8, 2.3, [-4, 5], ['apple', 'banana']]
</code></pre>
<p>A list can contain different types of values, including other lists.</p>
<p>For example:</p>
<pre><code class="language-python">numbers = [10, 20, 30]
names = ["Sritesh", "Python"]
mixed = [10, "Python", True, 5.5]
</code></pre>
<p>Lists are <strong>mutable</strong>, which means their contents can be changed after creation.</p>
<p>For example:</p>
<pre><code class="language-python">numbers = [10, 20, 30]

numbers[0] = 100

print(numbers)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">[100, 20, 30]
</code></pre>
<p>We will explore lists in much more detail in a later day.</p>
<hr />
<h1>11. Tuple</h1>
<p>A <strong>tuple</strong> is an ordered, immutable collection of items.</p>
<p>Tuples are commonly written using parentheses <code>()</code>.</p>
<p>Example:</p>
<pre><code class="language-python">tuple1 = (("parrot", "sparrow"), ("Lion", "Tiger"))

print(tuple1)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">(('parrot', 'sparrow'), ('Lion', 'Tiger'))
</code></pre>
<p>Unlike lists, tuples are <strong>immutable</strong>.</p>
<p>That means their existing elements cannot be changed after the tuple is created.</p>
<p>Example:</p>
<pre><code class="language-python">numbers = (10, 20, 30)
</code></pre>
<p>You cannot directly change one of its elements like you can with a list.</p>
<p>We will learn more about tuples later.</p>
<hr />
<h1>12. Dictionary – <code>dict</code></h1>
<p>A <strong>dictionary</strong> stores data as <strong>key-value pairs</strong>.</p>
<p>Dictionaries are written using curly brackets <code>{}</code>.</p>
<p>Example:</p>
<pre><code class="language-python">student = {
    "name": "Sakshi",
    "age": 20,
    "canVote": True
}

print(student)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">{'name': 'Sakshi', 'age': 20, 'canVote': True}
</code></pre>
<p>Here:</p>
<ul>
<li><p><code>"name"</code> is a key and <code>"Sakshi"</code> is its value</p>
</li>
<li><p><code>"age"</code> is a key and <code>20</code> is its value</p>
</li>
<li><p><code>"canVote"</code> is a key and <code>True</code> is its value</p>
</li>
</ul>
<p>A dictionary allows us to store related information using meaningful keys.</p>
<p>For example:</p>
<pre><code class="language-python">person = {
    "name": "Sritesh",
    "age": 23,
    "language": "Python"
}
</code></pre>
<p>We can later access values using their keys.</p>
<pre><code class="language-python">print(person["name"])
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Sritesh
</code></pre>
<p>Modern Python dictionaries preserve <strong>insertion order</strong>, meaning items generally appear in the order they were added. The important concept here is that dictionaries are <strong>mappings of keys to values</strong>, rather than sequences indexed by position.</p>
<hr />
<h1>13. Checking Data Types</h1>
<p>Let's check the types of the different values used in this lesson:</p>
<pre><code class="language-python">a = complex(1, 2)
b = True
c = "Sritesh"
d = None

print(type(a))
print(type(b))
print(type(c))
print(type(d))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">&lt;class 'complex'&gt;
&lt;class 'bool'&gt;
&lt;class 'str'&gt;
&lt;class 'NoneType'&gt;
</code></pre>
<p>We can also check collections:</p>
<pre><code class="language-python">list1 = [1, 2, 3]
tuple1 = (1, 2, 3)
dict1 = {"name": "Sritesh"}

print(type(list1))
print(type(tuple1))
print(type(dict1))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">&lt;class 'list'&gt;
&lt;class 'tuple'&gt;
&lt;class 'dict'&gt;
</code></pre>
<hr />
<h1>14. Putting Everything Together</h1>
<p>Here is the complete program from today's lesson:</p>
<pre><code class="language-python"># Integer and float examples
# a = 123
# a = 1.23

# Complex number
a = complex(1, 2)

# Boolean
b = True

# String
c = "Sritesh"

# None
d = None

print(a)

a1 = 9
print(a + a1)

print("The type of a is", type(a))
print("The type of b is", type(b))
print("The type of c is", type(c))
print("The type of d is", type(d))

# List
list1 = [8, 2.3, [-4, 5], ["apple", "banana"]]

print(list1)
print("The type of list1 is", type(list1))

# Tuple
tuple1 = (("parrot", "sparrow"), ("Lion", "Tiger"))

print(tuple1)
print("The type of tuple1 is", type(tuple1))

# Dictionary
dict1 = {
    "name": "Sakshi",
    "age": 20,
    "canVote": True
}

print(dict1)
print("The type of dict1 is", type(dict1))
</code></pre>
<hr />
<h1>15. Quick Revision</h1>
<h3>Variable</h3>
<p>A name that refers to a value or object.</p>
<pre><code class="language-python">age = 23
</code></pre>
<h3><code>int</code></h3>
<p>Whole numbers.</p>
<pre><code class="language-python">age = 23
</code></pre>
<h3><code>float</code></h3>
<p>Decimal numbers.</p>
<pre><code class="language-python">height = 5.5
</code></pre>
<h3><code>complex</code></h3>
<p>Complex numbers.</p>
<pre><code class="language-python">number = 1 + 2j
</code></pre>
<h3><code>str</code></h3>
<p>Text.</p>
<pre><code class="language-python">name = "Sritesh"
</code></pre>
<h3><code>bool</code></h3>
<p><code>True</code> or <code>False</code>.</p>
<pre><code class="language-python">is_learning = True
</code></pre>
<h3><code>None</code></h3>
<p>Represents the absence of a value.</p>
<pre><code class="language-python">result = None
</code></pre>
<h3><code>list</code></h3>
<p>Ordered and mutable collection.</p>
<pre><code class="language-python">numbers = [1, 2, 3]
</code></pre>
<h3><code>tuple</code></h3>
<p>Ordered and immutable collection.</p>
<pre><code class="language-python">numbers = (1, 2, 3)
</code></pre>
<h3><code>dict</code></h3>
<p>Key-value mapping.</p>
<pre><code class="language-python">student = {"name": "Sritesh", "age": 23}
</code></pre>
<hr />
<h1>16. Key Takeaways</h1>
<p>After completing Day 6, you should understand:</p>
<ul>
<li><p>What a variable is</p>
</li>
<li><p>How to create and assign variables</p>
</li>
<li><p>What data types are</p>
</li>
<li><p>How to use the <code>type()</code> function</p>
</li>
<li><p><code>int</code>, <code>float</code>, and <code>complex</code></p>
</li>
<li><p><code>str</code> for text</p>
</li>
<li><p><code>bool</code> for Boolean values</p>
</li>
<li><p><code>None</code> and <code>NoneType</code></p>
</li>
<li><p>Lists and their mutability</p>
</li>
<li><p>Tuples and their immutability</p>
</li>
<li><p>Dictionaries and key-value pairs</p>
</li>
<li><p>Why understanding data types is important when writing Python programs</p>
</li>
</ul>
<p>These concepts are the foundation for the next stages of Python. Once we understand how Python represents and stores different kinds of data, we can start performing operations on that data and building more useful programs.</p>
<hr />
<h2><strong>📂 Day 6 Resources</strong></h2>
<p>All notes and code for this day are available in the GitHub repository:</p>
<p><a class="embed-card" href="https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/06-Day06-Variables-and-Datatypes">https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/06-Day06-Variables-and-Datatypes</a></p>

<hr />
]]></content:encoded></item><item><title><![CDATA[Day 5 – Comments, Escape Sequences & the print() Function in Python]]></title><description><![CDATA[Welcome to Day 5 of 100 Days of Python!
Today, we will learn three useful concepts:

Python comments

Escape sequences

More options of the print() function


These concepts may look simple, but they ]]></description><link>https://sritesh-tech-journal.hashnode.dev/day-5-comments-escape-sequences-the-print-function-in-python</link><guid isPermaLink="true">https://sritesh-tech-journal.hashnode.dev/day-5-comments-escape-sequences-the-print-function-in-python</guid><category><![CDATA[100 days of python	]]></category><category><![CDATA[Python]]></category><category><![CDATA[Python 3]]></category><dc:creator><![CDATA[SRITESH SURANJAN]]></dc:creator><pubDate>Sat, 12 Sep 2026 06:52:26 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/0c3ee245-ae37-4686-bb37-17bc87239d1b.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<img src="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/2e5455be-275f-45c1-bd22-6ff99e0f9ed4.jpg" alt="" style="display:block;margin:0 auto" />

<p>Welcome to <strong>Day 5 of 100 Days of Python!</strong></p>
<p>Today, we will learn three useful concepts:</p>
<ul>
<li><p>Python comments</p>
</li>
<li><p>Escape sequences</p>
</li>
<li><p>More options of the <code>print()</code> function</p>
</li>
</ul>
<p>These concepts may look simple, but they are important for writing readable Python programs and controlling how output is displayed.</p>
<hr />
<h2>1. Python Comments</h2>
<p>A <strong>comment</strong> is text written in a Python program that is ignored by the Python interpreter during execution.</p>
<p>Comments are mainly used to:</p>
<ul>
<li><p>Explain what a piece of code does</p>
</li>
<li><p>Make code easier to understand</p>
</li>
<li><p>Add notes for yourself or other developers</p>
</li>
<li><p>Temporarily prevent a line of code from executing while testing</p>
</li>
</ul>
<h3>Single-Line Comments</h3>
<p>In Python, a single-line comment starts with the <code>#</code> symbol.</p>
<p>Everything after <code>#</code> on that line is treated as a comment.</p>
<h3>Example 1</h3>
<pre><code class="language-python"># This is a single-line comment

print("This is a print statement.")
</code></pre>
<h3>Output</h3>
<pre><code class="language-text">This is a print statement.
</code></pre>
<p>The comment does not produce any output.</p>
<hr />
<h3>Example 2: Comment After Code</h3>
<p>A comment can also be written after a statement.</p>
<pre><code class="language-python">print("Hello World!")  # Printing Hello World
</code></pre>
<h3>Output</h3>
<pre><code class="language-text">Hello World!
</code></pre>
<p>The Python interpreter executes the <code>print()</code> statement but ignores the comment.</p>
<hr />
<h3>Example 3: Temporarily Disabling Code</h3>
<p>Comments can also be useful when testing code.</p>
<pre><code class="language-python">print("Python Program")

# print("Python Program")
</code></pre>
<h3>Output</h3>
<pre><code class="language-text">Python Program
</code></pre>
<p>The second <code>print()</code> statement does not execute because it has been commented out.</p>
<hr />
<h1>2. Multi-Line Comments</h1>
<p>Python does not have a special syntax specifically designed for multi-line comments.</p>
<p>If you want to write a comment across multiple lines, the recommended approach is to use <code>#</code> on each line.</p>
<h3>Example</h3>
<pre><code class="language-python"># This program checks whether p is greater than 5.
# If the condition is true, the first message is printed.
# Otherwise, the second message is printed.

p = 7

if p &gt; 5:
    print("p is greater than 5.")
else:
    print("p is not greater than 5.")
</code></pre>
<h3>Output</h3>
<pre><code class="language-text">p is greater than 5.
</code></pre>
<hr />
<h2>Triple-Quoted Strings</h2>
<p>You may also see triple quotes being used for blocks of text:</p>
<pre><code class="language-python">"""
This looks like a multi-line comment.
It is actually a multi-line string.
"""

p = 7

if p &gt; 5:
    print("p is greater than 5.")
else:
    print("p is not greater than 5.")
</code></pre>
<h3>Output</h3>
<pre><code class="language-text">p is greater than 5.
</code></pre>
<p>Triple-quoted text is technically a <strong>string literal</strong>, not a comment.</p>
<p>Triple-quoted strings are commonly used for <strong>docstrings</strong>, which document functions, classes, and modules.</p>
<p>For example:</p>
<pre><code class="language-python">def greet():
    """This function prints a greeting."""
    print("Hello!")
</code></pre>
<p>For normal comments, prefer <code>#</code>.</p>
<hr />
<h1>3. Escape Sequences</h1>
<p>An <strong>escape sequence</strong> is a special combination of characters used inside a string to represent characters or actions that would otherwise be difficult to write directly.</p>
<p>Escape sequences usually begin with a backslash (<code>\</code>).</p>
<p>For example, suppose we want to include double quotes inside a string that is already surrounded by double quotes.</p>
<p>This would cause a problem:</p>
<pre><code class="language-python">print("This doesn't "execute" correctly")
</code></pre>
<p>Python cannot determine where the string ends.</p>
<p>We can use the <code>\"</code> escape sequence:</p>
<pre><code class="language-python">print("This will \"execute\" correctly")
</code></pre>
<h3>Output</h3>
<pre><code class="language-text">This will "execute" correctly
</code></pre>
<hr />
<h2>Common Escape Sequences</h2>
<p>Here are some useful escape sequences:</p>
<table>
<thead>
<tr>
<th>Escape Sequence</th>
<th>Meaning</th>
</tr>
</thead>
<tbody><tr>
<td><code>\n</code></td>
<td>New line</td>
</tr>
<tr>
<td><code>\t</code></td>
<td>Tab</td>
</tr>
<tr>
<td><code>\\</code></td>
<td>Backslash</td>
</tr>
<tr>
<td><code>\"</code></td>
<td>Double quote</td>
</tr>
<tr>
<td><code>\'</code></td>
<td>Single quote</td>
</tr>
</tbody></table>
<h3>Example</h3>
<pre><code class="language-python">print("Hello\nPython")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Hello
Python
</code></pre>
<p>The <code>\n</code> moves the output to a new line.</p>
<p>Another example:</p>
<pre><code class="language-python">print("Name:\tSritesh")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Name:   Sritesh
</code></pre>
<p>The <code>\t</code> inserts a tab space.</p>
<hr />
<h1>4. More About the <code>print()</code> Function</h1>
<p>So far, we have used <code>print()</code> to display text and numbers.</p>
<p>Python's <code>print()</code> function provides additional parameters that allow us to control how multiple values are displayed.</p>
<p>A simplified form of its syntax is:</p>
<pre><code class="language-python">print(*objects, sep=' ', end='\n', file=None, flush=False)
</code></pre>
<p>The most commonly useful parameters for beginners are:</p>
<ul>
<li><p><code>objects</code></p>
</li>
<li><p><code>sep</code></p>
</li>
<li><p><code>end</code></p>
</li>
</ul>
<hr />
<h2><code>objects</code></h2>
<p><code>print()</code> can display one or more objects.</p>
<pre><code class="language-python">print("Hello")
print(10)
print("Python", 100)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Hello
10
Python 100
</code></pre>
<p>When multiple objects are passed to <code>print()</code>, Python separates them with a space by default.</p>
<hr />
<h1>5. The <code>sep</code> Parameter</h1>
<p><code>sep</code> stands for <strong>separator</strong>.</p>
<p>It controls what is placed between multiple objects.</p>
<p>The default value is a space:</p>
<pre><code class="language-python">print("Python", "Java", "C++")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Python Java C++
</code></pre>
<p>We can change the separator:</p>
<pre><code class="language-python">print("Python", "Java", "C++", sep="~")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Python~Java~C++
</code></pre>
<p>Another example:</p>
<pre><code class="language-python">print("2026", "09", "12", sep="-")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">2026-09-12
</code></pre>
<hr />
<h1>6. The <code>end</code> Parameter</h1>
<p>By default, <code>print()</code> moves to a new line after displaying the output.</p>
<p>This happens because the default value of <code>end</code> is <code>"\n"</code>.</p>
<p>For example:</p>
<pre><code class="language-python">print("Hello")
print("World")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Hello
World
</code></pre>
<p>We can change the ending character.</p>
<pre><code class="language-python">print("Hello", end=" ")
print("World")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Hello World
</code></pre>
<p>We can also use another string:</p>
<pre><code class="language-python">print("Hello", end="003\n")
print("World")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Hello003
World
</code></pre>
<hr />
<h1>7. Combining <code>sep</code> and <code>end</code></h1>
<p>The <code>sep</code> and <code>end</code> parameters can also be used together.</p>
<pre><code class="language-python">print("Hey", 6, 7, sep="~", end="003\n")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Hey~6~7003
</code></pre>
<p>Here:</p>
<ul>
<li><p><code>sep="~"</code> places <code>~</code> between <code>Hey</code>, <code>6</code>, and <code>7</code></p>
</li>
<li><p><code>end="003\n"</code> adds <code>003</code> after the final value and then moves to a new line</p>
</li>
</ul>
<hr />
<h1>8. Putting Everything Together</h1>
<p>Here is a small program using comments, escape sequences, <code>sep</code>, and <code>end</code>:</p>
<pre><code class="language-python"># Learning comments, escape sequences and print()

print("Hey! I am a \"Good Boy\".\nI am learning Python")

print("Hey", 6, 7, sep="~", end="003\n")

print("Hello!")
</code></pre>
<h3>Output</h3>
<pre><code class="language-text">Hey! I am a "Good Boy".
I am learning Python
Hey~6~7003
Hello!
</code></pre>
<hr />
<h1>9. Common Mistakes</h1>
<h3>Mistake 1: Forgetting the <code>#</code></h3>
<p>Incorrect:</p>
<pre><code class="language-python">This is a comment
</code></pre>
<p>Python will try to interpret it as code.</p>
<p>Correct:</p>
<pre><code class="language-python"># This is a comment
</code></pre>
<hr />
<h3>Mistake 2: Incorrectly using quotes inside a string</h3>
<p>Incorrect:</p>
<pre><code class="language-python">print("He said "Hello"")
</code></pre>
<p>Correct:</p>
<pre><code class="language-python">print("He said \"Hello\"")
</code></pre>
<p>Or use different quote types:</p>
<pre><code class="language-python">print('He said "Hello"')
</code></pre>
<hr />
<h3>Mistake 3: Confusing <code>sep</code> and <code>end</code></h3>
<p>Remember:</p>
<ul>
<li><p><code>sep</code> → controls the separator <strong>between objects</strong></p>
</li>
<li><p><code>end</code> → controls what is printed <strong>after the final object</strong></p>
</li>
</ul>
<hr />
<h1>10. Quick Revision</h1>
<h3>Comments</h3>
<pre><code class="language-python"># This is a comment
</code></pre>
<p>Comments are ignored by Python and are used to explain code or temporarily disable code.</p>
<h3>Escape Sequences</h3>
<p>Escape sequences begin with <code>\</code>.</p>
<p>Common examples:</p>
<pre><code class="language-text">\n  → New line
\t  → Tab
\\  → Backslash
\"  → Double quote
\'  → Single quote
</code></pre>
<h3><code>print()</code></h3>
<p>Basic usage:</p>
<pre><code class="language-python">print("Hello")
</code></pre>
<p>Using <code>sep</code>:</p>
<pre><code class="language-python">print("A", "B", "C", sep="-")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">A-B-C
</code></pre>
<p>Using <code>end</code>:</p>
<pre><code class="language-python">print("Hello", end=" ")
print("World")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Hello World
</code></pre>
<hr />
<h1>11. Key Takeaways</h1>
<p>After Day 5, you should understand:</p>
<ul>
<li><p>What comments are and why they are useful</p>
</li>
<li><p>How to create single-line comments using <code>#</code></p>
</li>
<li><p>Why triple-quoted text is technically a string rather than a comment</p>
</li>
<li><p>What escape sequences are</p>
</li>
<li><p>How <code>\n</code>, <code>\t</code>, <code>\\</code>, <code>\"</code>, and <code>\'</code> work</p>
</li>
<li><p>How <code>print()</code> accepts multiple objects</p>
</li>
<li><p>How <code>sep</code> changes the separator between objects</p>
</li>
<li><p>How <code>end</code> changes what <code>print()</code> outputs after each call</p>
</li>
</ul>
<p>These are small concepts, but they will appear frequently in Python programs as we move into variables, data types, conditions, loops, functions, and beyond.</p>
<hr />
<h2><strong>📂 Day 5 Resources</strong></h2>
<p>All notes and code for this day are available in the GitHub repository:</p>
<p><a class="embed-card" href="https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/05-Day05-Comments-and-Print">https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/05-Day05-Comments-and-Print</a></p>

<hr />
]]></content:encoded></item><item><title><![CDATA[Day 4 - Our First Python Program]]></title><description><![CDATA[Welcome to Day 4 of 100 Days of Python!
So far, we have learned:

What programming is

What Python is

Where Python is used

What modules and packages are

How pip is used to install Python packages

]]></description><link>https://sritesh-tech-journal.hashnode.dev/day-4-our-first-python-program</link><guid isPermaLink="true">https://sritesh-tech-journal.hashnode.dev/day-4-our-first-python-program</guid><category><![CDATA[100 days of python	]]></category><category><![CDATA[Python]]></category><category><![CDATA[Python 3]]></category><dc:creator><![CDATA[SRITESH SURANJAN]]></dc:creator><pubDate>Sat, 12 Sep 2026 04:42:19 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/47d52a4a-1bd6-4482-89da-41b991e2302d.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<hr />
<img src="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/49137e3c-d8e3-4c47-bf6c-8b1651af707b.jpg" alt="" style="display:block;margin:0 auto" />

<p>Welcome to <strong>Day 4 of 100 Days of Python!</strong></p>
<p>So far, we have learned:</p>
<ul>
<li><p>What programming is</p>
</li>
<li><p>What Python is</p>
</li>
<li><p>Where Python is used</p>
</li>
<li><p>What modules and packages are</p>
</li>
<li><p>How <code>pip</code> is used to install Python packages</p>
</li>
</ul>
<p>Today, we are finally going to write our <strong>first Python program from scratch</strong>.</p>
<p>It may look very simple—and it is.</p>
<p>But every Python developer has to start somewhere.</p>
<p>Today, that starting point is the <code>print()</code> function.</p>
<hr />
<h1>The <code>print()</code> Function</h1>
<p>The <code>print()</code> function is used to display information on the console.</p>
<p>The simplest example is:</p>
<pre><code class="language-python">print("Hello World!")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Hello World!
</code></pre>
<p>Here:</p>
<ul>
<li><p><code>print</code> is a built-in Python function.</p>
</li>
<li><p><code>"Hello World!"</code> is a string.</p>
</li>
<li><p>The value inside the parentheses is passed to <code>print()</code>.</p>
</li>
<li><p>Python displays the result on the console.</p>
</li>
</ul>
<hr />
<h1>Printing Text</h1>
<p>We can use <code>print()</code> to display text.</p>
<p>Text in Python is written inside quotes.</p>
<p>For example:</p>
<pre><code class="language-python">print("Hello World!")
print("Welcome to Python!")
print("I am learning Python.")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Hello World!
Welcome to Python!
I am learning Python.
</code></pre>
<p>Each <code>print()</code> statement normally displays its output on a new line.</p>
<hr />
<h1>Printing Numbers</h1>
<p>We can also print numbers directly.</p>
<p>For example:</p>
<pre><code class="language-python">print(753)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">753
</code></pre>
<p>Notice that we don't need quotation marks around a number.</p>
<p>Compare:</p>
<pre><code class="language-python">print(753)
</code></pre>
<p>with:</p>
<pre><code class="language-python">print("753")
</code></pre>
<p>Both display:</p>
<pre><code class="language-text">753
</code></pre>
<p>However, they represent different types of values.</p>
<ul>
<li><p><code>753</code> is a number.</p>
</li>
<li><p><code>"753"</code> is text (a string).</p>
</li>
</ul>
<p>We will learn more about data types later.</p>
<hr />
<h1>Printing Multiple Values</h1>
<p>The <code>print()</code> function can accept multiple values separated by commas.</p>
<p>For example:</p>
<pre><code class="language-python">print("Hello World!", 753)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Hello World! 753
</code></pre>
<p>Python separates the values with a space by default.</p>
<p>We can also print several values:</p>
<pre><code class="language-python">print("Python", "is", "awesome")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Python is awesome
</code></pre>
<hr />
<h1>Printing Calculations</h1>
<p>Python can also perform calculations inside <code>print()</code>.</p>
<p>For example:</p>
<pre><code class="language-python">print(753 * 3510)
</code></pre>
<p>Python evaluates the multiplication first and then prints the result.</p>
<p>Output:</p>
<pre><code class="language-text">2643030
</code></pre>
<p>This is one of the reasons programming languages are useful: we can give the computer an expression, and it can perform the calculation for us.</p>
<p>Other examples:</p>
<pre><code class="language-python">print(10 + 5)
print(20 - 8)
print(6 * 7)
print(20 / 4)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">15
12
42
5.0
</code></pre>
<p>We will learn operators and calculations in more detail later.</p>
<hr />
<h1>Our First Python Program</h1>
<p>Let's combine everything we learned today.</p>
<pre><code class="language-python">print("Hello World!", 753)
print(753)
print("Bye")
print(753 * 3510)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Hello World! 753
753
Bye
2643030
</code></pre>
<p>This is a very small program, but it already demonstrates several important ideas:</p>
<ol>
<li><p>Printing text</p>
</li>
<li><p>Printing numbers</p>
</li>
<li><p>Printing multiple values</p>
</li>
<li><p>Performing a calculation</p>
</li>
<li><p>Executing multiple statements in sequence</p>
</li>
</ol>
<hr />
<h1>How Python Executes the Program</h1>
<p>Python executes our program from <strong>top to bottom</strong>.</p>
<p>Consider:</p>
<pre><code class="language-python">print("First")
print("Second")
print("Third")
</code></pre>
<p>The output will be:</p>
<pre><code class="language-text">First
Second
Third
</code></pre>
<p>Python starts with the first statement, executes it, moves to the next statement, and continues until the program ends.</p>
<p>This sequential execution will become extremely important when we start learning conditions, loops, functions, and more advanced concepts.</p>
<hr />
<h1>A Small Challenge</h1>
<p>Now it is your turn!</p>
<p>Write a Python program that prints a short poem.</p>
<p>For example, the structure could be:</p>
<pre><code class="language-python">print("Your poem goes here")
print("Another line of your poem")
print("Another line of your poem")
</code></pre>
<p>You can choose <strong>any poem you like</strong>.</p>
<p>The purpose of this exercise is not to write complicated code.</p>
<p>The purpose is to practice writing and executing Python code yourself.</p>
<hr />
<h1>Challenge: Create Your Own Output</h1>
<p>Try creating a small program that prints:</p>
<ul>
<li><p>Your name</p>
</li>
<li><p>A programming-related message</p>
</li>
<li><p>A number</p>
</li>
<li><p>A calculation</p>
</li>
</ul>
<p>For example:</p>
<pre><code class="language-python">print("My name is Sritesh.")
print("I am learning Python.")
print(100)
print(25 * 4)
</code></pre>
<p>Try changing the values and see what happens.</p>
<hr />
<h1>Common Mistakes</h1>
<h2>1. Forgetting Quotes Around Text</h2>
<p>Incorrect:</p>
<pre><code class="language-python">print(Hello World!)
</code></pre>
<p>Correct:</p>
<pre><code class="language-python">print("Hello World!")
</code></pre>
<p>Text should generally be enclosed in quotation marks.</p>
<hr />
<h2>2. Missing Parentheses</h2>
<p>Incorrect:</p>
<pre><code class="language-python">print "Hello World!"
</code></pre>
<p>Correct:</p>
<pre><code class="language-python">print("Hello World!")
</code></pre>
<p>Python 3 uses parentheses with the <code>print()</code> function.</p>
<hr />
<h2>3. Incorrect String Quotes</h2>
<p>Incorrect:</p>
<pre><code class="language-python">print("Hello World!)
</code></pre>
<p>The opening and closing quotes must match.</p>
<p>Correct:</p>
<pre><code class="language-python">print("Hello World!")
</code></pre>
<hr />
<h2>4. Writing a Calculation as Text</h2>
<p>Compare:</p>
<pre><code class="language-python">print(10 + 5)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">15
</code></pre>
<p>with:</p>
<pre><code class="language-python">print("10 + 5")
</code></pre>
<p>Output:</p>
<pre><code class="language-text">10 + 5
</code></pre>
<p>The first performs a calculation.</p>
<p>The second simply prints the characters as text.</p>
<hr />
<h1>Quick Revision</h1>
<h3>What is <code>print()</code>?</h3>
<p><code>print()</code> is a built-in Python function used to display information on the console.</p>
<h3>Print text</h3>
<pre><code class="language-python">print("Hello World!")
</code></pre>
<h3>Print a number</h3>
<pre><code class="language-python">print(753)
</code></pre>
<h3>Print multiple values</h3>
<pre><code class="language-python">print("Hello", 753)
</code></pre>
<h3>Print a calculation</h3>
<pre><code class="language-python">print(753 * 3510)
</code></pre>
<h3>Python execution order</h3>
<p>Python normally executes statements from <strong>top to bottom</strong>.</p>
<hr />
<h1>Day 4 Takeaways</h1>
<p>Today we learned:</p>
<ol>
<li><p>How to write a basic Python program.</p>
</li>
<li><p>How to use the <code>print()</code> function.</p>
</li>
<li><p>How to print text.</p>
</li>
<li><p>How to print numbers.</p>
</li>
<li><p>How to print multiple values.</p>
</li>
<li><p>How to perform calculations inside <code>print()</code>.</p>
</li>
<li><p>How Python executes statements sequentially.</p>
</li>
<li><p>How to create a simple Python program independently.</p>
</li>
</ol>
<hr />
<h1>Final Thought</h1>
<p>Our first program is intentionally simple.</p>
<p>That's okay.</p>
<p>Every large Python application—from automation scripts to Machine Learning systems—is ultimately built from smaller programming concepts.</p>
<p>Today we wrote a few <code>print()</code> statements.</p>
<p>Soon, we will learn how to make our programs <strong>store information, make decisions, repeat tasks, accept input, work with data, and solve real problems</strong>.</p>
<p>For now:</p>
<p><strong>We have officially written our first Python program.</strong></p>
<p><strong>Day 4 complete. 🚀</strong></p>
<hr />
<h2>📂 Day 4 Resources</h2>
<p>All notes and code for this day are available in the GitHub repository:</p>
<p><a class="embed-card" href="https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/04-Day04-Our-First-Program">https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/04-Day04-Our-First-Program</a></p>

<hr />
]]></content:encoded></item><item><title><![CDATA[Day 3 - Python Modules and pip]]></title><description><![CDATA[Welcome to Day 3 of 100 Days of Python!
On Day 1, we learned what Python is and where it is used.
On Day 2, we explored the different kinds of applications that can be built with Python.
Today, we are]]></description><link>https://sritesh-tech-journal.hashnode.dev/day-3-python-modules-and-pip</link><guid isPermaLink="true">https://sritesh-tech-journal.hashnode.dev/day-3-python-modules-and-pip</guid><category><![CDATA[100 days of python	]]></category><category><![CDATA[Python]]></category><category><![CDATA[Python 3]]></category><dc:creator><![CDATA[SRITESH SURANJAN]]></dc:creator><pubDate>Sat, 12 Sep 2026 04:21:35 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/20212740-c314-4c53-a4f1-6032a80a39ee.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<img src="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/1130fb59-06a6-423d-ac69-77d4e650d5eb.jpg" alt="" style="display:block;margin:0 auto" />

<p>Welcome to <strong>Day 3 of 100 Days of Python!</strong></p>
<p>On Day 1, we learned what Python is and where it is used.</p>
<p>On Day 2, we explored the different kinds of applications that can be built with Python.</p>
<p>Today, we are going to learn two concepts that we will use throughout our Python journey:</p>
<ul>
<li><p><strong>Modules</strong></p>
</li>
<li><p><strong>pip</strong></p>
</li>
</ul>
<p>As we start building larger Python programs, we don't want to write every piece of functionality from scratch.</p>
<p>Python allows us to reuse existing code through modules and packages.</p>
<hr />
<h1>What is a Module?</h1>
<p>A <strong>module</strong> is a Python file containing code that can be reused in another Python program.</p>
<p>A module can contain:</p>
<ul>
<li><p>Variables</p>
</li>
<li><p>Functions</p>
</li>
<li><p>Classes</p>
</li>
<li><p>Constants</p>
</li>
<li><p>Other Python code</p>
</li>
</ul>
<p>Instead of writing the same functionality repeatedly, we can put reusable code into a module and import it whenever we need it.</p>
<p>For example, imagine we have a file called:</p>
<pre><code class="language-text">calculator.py
</code></pre>
<p>It could contain:</p>
<pre><code class="language-python">def add(a, b):
    return a + b
</code></pre>
<p>We could then import it into another Python program:</p>
<pre><code class="language-python">import calculator

result = calculator.add(10, 20)
print(result)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">30
</code></pre>
<p>This is one of the fundamental ideas behind code reuse in Python.</p>
<hr />
<h1>Types of Modules</h1>
<p>Python modules can broadly be divided into two categories:</p>
<ol>
<li><p>Standard Library Modules</p>
</li>
<li><p>Third-Party Modules</p>
</li>
</ol>
<hr />
<h2>1. Standard Library Modules</h2>
<p>Python comes with a large collection of modules as part of its <strong>standard library</strong>.</p>
<p>These modules are available with a normal Python installation, so we generally do not need to install them separately using <code>pip</code>.</p>
<p>For example:</p>
<pre><code class="language-python">import hashlib
</code></pre>
<p><code>hashlib</code> is part of Python's standard library and provides common hashing algorithms.</p>
<p>Other examples include:</p>
<pre><code class="language-python">import math
import random
import os
import sys
import datetime
</code></pre>
<p>These modules provide functionality that we can reuse in our programs.</p>
<hr />
<h2>2. Third-Party Modules</h2>
<p>Third-party modules/packages are created and maintained outside the Python standard library.</p>
<p>We can install them when we need additional functionality.</p>
<p>For example:</p>
<ul>
<li><p>Pandas → Data analysis</p>
</li>
<li><p>NumPy → Numerical computing</p>
</li>
<li><p>Requests → HTTP requests</p>
</li>
<li><p>Flask → Web applications</p>
</li>
<li><p>FastAPI → APIs</p>
</li>
<li><p>OpenCV → Computer vision</p>
</li>
<li><p>Scikit-learn → Machine Learning</p>
</li>
</ul>
<p>These packages greatly expand what Python can do.</p>
<hr />
<h1>What is pip?</h1>
<p><strong>pip</strong> is the standard package installer for Python.</p>
<p>It allows us to install Python packages from the Python Package Index (<strong>PyPI</strong>) and other package sources.</p>
<p>For example, if we want to install Pandas, we can run:</p>
<pre><code class="language-bash">pip install pandas
</code></pre>
<p>After installation, we can import it into our Python program:</p>
<pre><code class="language-python">import pandas
</code></pre>
<hr />
<h1>Installing a Package with pip</h1>
<p>Let's install Pandas.</p>
<p>Open a terminal or command prompt and run:</p>
<pre><code class="language-bash">pip install pandas
</code></pre>
<p>pip will download Pandas and its required dependencies and install them into the appropriate Python environment.</p>
<p>After installation, we can use it in our Python program.</p>
<p>For example:</p>
<pre><code class="language-python">import pandas

df = pandas.read_csv("words.csv")

print(df)
</code></pre>
<p>Here:</p>
<ul>
<li><p><code>import pandas</code> imports the Pandas package.</p>
</li>
<li><p><code>pandas.read_csv()</code> reads a CSV file.</p>
</li>
<li><p><code>df</code> stores the resulting data structure.</p>
</li>
</ul>
<p>We will learn Pandas properly later in the Python journey.</p>
<hr />
<h1><code>import</code> in Python</h1>
<p>The <code>import</code> statement allows us to use code from another module or package.</p>
<p>For example:</p>
<pre><code class="language-python">import math

print(math.sqrt(25))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">5.0
</code></pre>
<p>Here:</p>
<pre><code class="language-python">import math
</code></pre>
<p>imports the <code>math</code> module.</p>
<p>We can then access its functionality using:</p>
<pre><code class="language-python">math.sqrt()
</code></pre>
<hr />
<h1>Importing Specific Items</h1>
<p>We can also import a specific function or object from a module.</p>
<p>For example:</p>
<pre><code class="language-python">from math import sqrt

print(sqrt(25))
</code></pre>
<p>Output:</p>
<pre><code class="language-text">5.0
</code></pre>
<p>Instead of writing:</p>
<pre><code class="language-python">math.sqrt(25)
</code></pre>
<p>we can directly write:</p>
<pre><code class="language-python">sqrt(25)
</code></pre>
<hr />
<h1>Importing with an Alias</h1>
<p>Sometimes module names are long or we simply want a shorter name.</p>
<p>Python allows us to create an alias using the <code>as</code> keyword.</p>
<p>For example:</p>
<pre><code class="language-python">import pandas as pd
</code></pre>
<p>Now we can use:</p>
<pre><code class="language-python">pd.read_csv("words.csv")
</code></pre>
<p>instead of:</p>
<pre><code class="language-python">pandas.read_csv("words.csv")
</code></pre>
<p>You will see this frequently in real-world Python code.</p>
<p>For example:</p>
<pre><code class="language-python">import numpy as np
import pandas as pd
</code></pre>
<p>These are common conventions in the Python ecosystem.</p>
<hr />
<h1>Standard Library vs Third-Party Packages</h1>
<p>It is important to understand the difference.</p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Example</th>
<th>Installation</th>
</tr>
</thead>
<tbody><tr>
<td>Standard Library</td>
<td><code>math</code></td>
<td>Usually included with Python</td>
</tr>
<tr>
<td>Standard Library</td>
<td><code>hashlib</code></td>
<td>Usually included with Python</td>
</tr>
<tr>
<td>Standard Library</td>
<td><code>random</code></td>
<td>Usually included with Python</td>
</tr>
<tr>
<td>Third-Party</td>
<td><code>pandas</code></td>
<td>Usually installed separately</td>
</tr>
<tr>
<td>Third-Party</td>
<td><code>numpy</code></td>
<td>Usually installed separately</td>
</tr>
<tr>
<td>Third-Party</td>
<td><code>requests</code></td>
<td>Usually installed separately</td>
</tr>
<tr>
<td>Third-Party</td>
<td><code>flask</code></td>
<td>Usually installed separately</td>
</tr>
</tbody></table>
<p>The standard library comes with Python, while third-party packages are installed separately when required.</p>
<hr />
<h1>Package vs Module</h1>
<p>These terms are often used together, but they are not exactly the same.</p>
<h3>Module</h3>
<p>A module is generally a single Python file containing reusable code.</p>
<p>Example:</p>
<pre><code class="language-text">calculator.py
</code></pre>
<h3>Package</h3>
<p>A package is a way of organizing multiple Python modules into a larger reusable structure.</p>
<p>For example:</p>
<pre><code class="language-text">my_package/
    module1.py
    module2.py
    module3.py
</code></pre>
<p>Packages allow larger projects and libraries to organize their code into logical components.</p>
<hr />
<h1>Why Are Modules and Packages Important?</h1>
<p>Imagine building a large application completely from scratch.</p>
<p>You would have to write everything yourself:</p>
<ul>
<li><p>Mathematical functions</p>
</li>
<li><p>File handling</p>
</li>
<li><p>HTTP communication</p>
</li>
<li><p>Data processing</p>
</li>
<li><p>Database interaction</p>
</li>
<li><p>Machine Learning algorithms</p>
</li>
<li><p>Image processing</p>
</li>
</ul>
<p>That would take an enormous amount of time.</p>
<p>Instead, Python developers reuse existing, tested functionality whenever appropriate.</p>
<p>For example:</p>
<pre><code class="language-text">Python
  │
  ├── Standard Library
  │
  ├── Third-Party Packages
  │       │
  │       ├── NumPy
  │       ├── Pandas
  │       ├── Requests
  │       ├── OpenCV
  │       └── Scikit-learn
  │
  └── Our Own Modules
</code></pre>
<p>This ecosystem is one of Python's biggest strengths.</p>
<hr />
<h1>Checking Installed Packages</h1>
<p>We can use pip to see packages installed in an environment.</p>
<pre><code class="language-bash">pip list
</code></pre>
<p>This displays installed Python packages and their versions.</p>
<p>We can also check information about a particular package:</p>
<pre><code class="language-bash">pip show pandas
</code></pre>
<hr />
<h1>Installing a Specific Version</h1>
<p>Sometimes a project requires a particular package version.</p>
<p>We can specify the version while installing:</p>
<pre><code class="language-bash">pip install pandas==2.3.2
</code></pre>
<p>The exact version should depend on the requirements of the project.</p>
<p>We can also upgrade a package:</p>
<pre><code class="language-bash">pip install --upgrade pandas
</code></pre>
<hr />
<h1>Removing a Package</h1>
<p>If we no longer need a package, we can uninstall it:</p>
<pre><code class="language-bash">pip uninstall pandas
</code></pre>
<p>pip will ask for confirmation before removing the package.</p>
<hr />
<h1>A Note About Virtual Environments</h1>
<p>As Python projects become larger, installing every package globally can cause dependency conflicts.</p>
<p>For example:</p>
<pre><code class="language-text">Project A → requires Package X version 1
Project B → requires Package X version 2
</code></pre>
<p>A useful solution is to create a <strong>virtual environment</strong> for each project.</p>
<p>We will explore virtual environments and dependency management in more detail later.</p>
<p>For now, remember:</p>
<blockquote>
<p><strong>A virtual environment provides an isolated Python environment for a project and its dependencies.</strong></p>
</blockquote>
<hr />
<h1>Our Day 3 Code</h1>
<p>Our basic demonstration contains both a third-party package and a standard-library module:</p>
<pre><code class="language-python">import pandas
import hashlib

print("Hi!")
</code></pre>
<p>Here:</p>
<pre><code class="language-python">import pandas
</code></pre>
<p>imports the third-party Pandas package.</p>
<p>And:</p>
<pre><code class="language-python">import hashlib
</code></pre>
<p>imports a module from Python's standard library.</p>
<p>The important point is that <code>pandas</code> normally needs to be installed separately, while <code>hashlib</code> is available as part of Python's standard library.</p>
<hr />
<h1>Important Commands</h1>
<p>Here are the basic pip commands introduced today:</p>
<pre><code class="language-bash">pip install package_name
</code></pre>
<p>Install a package.</p>
<pre><code class="language-bash">pip uninstall package_name
</code></pre>
<p>Uninstall a package.</p>
<pre><code class="language-bash">pip list
</code></pre>
<p>List installed packages.</p>
<pre><code class="language-bash">pip show package_name
</code></pre>
<p>Show information about a package.</p>
<pre><code class="language-bash">pip install --upgrade package_name
</code></pre>
<p>Upgrade a package.</p>
<pre><code class="language-bash">pip install package_name==version
</code></pre>
<p>Install a specific package version.</p>
<hr />
<h1>Common Mistakes</h1>
<h2>Mistake 1: Forgetting to Install a Third-Party Package</h2>
<p>If you write:</p>
<pre><code class="language-python">import pandas
</code></pre>
<p>without having Pandas installed in the active environment, Python may produce:</p>
<pre><code class="language-text">ModuleNotFoundError
</code></pre>
<p>Install it with:</p>
<pre><code class="language-bash">pip install pandas
</code></pre>
<hr />
<h2>Mistake 2: Installing Packages in the Wrong Environment</h2>
<p>You may install a package successfully but still receive:</p>
<pre><code class="language-text">ModuleNotFoundError
</code></pre>
<p>This can happen when <code>pip</code> installs the package into a different Python environment than the one running your program.</p>
<p>Virtual environments help prevent these problems.</p>
<hr />
<h2>Mistake 3: Confusing <code>pip</code> with <code>import</code></h2>
<p>Remember:</p>
<pre><code class="language-bash">pip install pandas
</code></pre>
<p>is a <strong>terminal command</strong> used to install a package.</p>
<p>Whereas:</p>
<pre><code class="language-python">import pandas
</code></pre>
<p>is <strong>Python code</strong> used to import the package into your program.</p>
<p>They perform different jobs.</p>
<hr />
<h1>Quick Revision</h1>
<h3>Module</h3>
<p>A reusable Python file containing code such as functions, classes, or variables.</p>
<h3>Standard Library</h3>
<p>Modules that are distributed with Python.</p>
<p>Examples:</p>
<pre><code class="language-python">math
random
os
sys
hashlib
</code></pre>
<h3>Third-Party Package</h3>
<p>Software developed outside Python's standard library and generally installed separately.</p>
<p>Examples:</p>
<pre><code class="language-text">pandas
numpy
requests
flask
opencv-python
</code></pre>
<h3>pip</h3>
<p>Python's standard package installer, commonly used to install and manage Python packages.</p>
<h3>Import</h3>
<p>Used to make a module or package available in our Python program.</p>
<pre><code class="language-python">import math
</code></pre>
<h3>Alias</h3>
<p>A different name given to an imported module.</p>
<pre><code class="language-python">import pandas as pd
</code></pre>
<hr />
<h1>Day 3 Takeaways</h1>
<ol>
<li><p>Modules allow us to reuse Python code.</p>
</li>
<li><p>Python provides a large standard library.</p>
</li>
<li><p>Third-party packages extend Python's capabilities.</p>
</li>
<li><p><code>pip</code> is commonly used to install Python packages.</p>
</li>
<li><p><code>import</code> is used to access modules and packages in Python code.</p>
</li>
<li><p><code>from ... import ...</code> can import specific items.</p>
</li>
<li><p><code>as</code> can create an alias for an import.</p>
</li>
<li><p>Virtual environments help isolate project dependencies.</p>
</li>
<li><p>Python's package ecosystem is a major reason for its popularity.</p>
</li>
</ol>
<hr />
<h1>Final Thought</h1>
<p>One of the most powerful ideas in programming is:</p>
<blockquote>
<p><strong>Don't reinvent the wheel when reliable code already exists.</strong></p>
</blockquote>
<p>Instead of writing everything from scratch, Python allows us to build on top of a huge ecosystem of existing modules and packages.</p>
<p>Today we learned how to access that ecosystem.</p>
<p>Soon, we will start writing more of our <strong>own reusable code</strong> as well.</p>
<p><strong>Day 3 complete.</strong></p>
<hr />
<h2>📂 Day 3 Resources</h2>
<p>👉 All notes and code for this day are available in the GitHub repository:</p>
<p><a class="embed-card" href="https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/03-Day03-Modules-and-Pip">https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/03-Day03-Modules-and-Pip</a></p>

<hr />
]]></content:encoded></item><item><title><![CDATA[Day 2 - Applications of Python]]></title><description><![CDATA[Welcome to Day 2 of 100 Days of Python!
On Day 1, we learned what programming is, what Python is, its major features, and where Python is used.
Today, instead of learning a large amount of syntax, let]]></description><link>https://sritesh-tech-journal.hashnode.dev/day-2-applications-of-python</link><guid isPermaLink="true">https://sritesh-tech-journal.hashnode.dev/day-2-applications-of-python</guid><category><![CDATA[100 days of python	]]></category><category><![CDATA[Python]]></category><category><![CDATA[Python 3]]></category><dc:creator><![CDATA[SRITESH SURANJAN]]></dc:creator><pubDate>Sat, 12 Sep 2026 03:19:26 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/3f06d09b-264b-4fbc-aaba-19fe4cfa5e6f.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<img src="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/f689719a-2a1d-4ab9-aca4-25b6b349da9d.jpg" alt="" style="display:block;margin:0 auto" />

<p>Welcome to <strong>Day 2 of 100 Days of Python!</strong></p>
<p>On Day 1, we learned what programming is, what Python is, its major features, and where Python is used.</p>
<p>Today, instead of learning a large amount of syntax, let's answer a more interesting question:</p>
<blockquote>
<p><strong>What can we actually build with Python?</strong></p>
</blockquote>
<p>Learning a programming language becomes much more exciting when we understand what it can be used to create.</p>
<p>Python is not limited to simple programs such as printing messages, performing calculations, or writing small scripts. It is used in <strong>automation, web development, data analysis, Artificial Intelligence, Machine Learning, computer vision, games, and many other areas</strong>.</p>
<p>During this 100 Days of Python journey, we will gradually develop the skills required to build projects like these.</p>
<hr />
<h1>Why Learn Python?</h1>
<p>One of the biggest advantages of Python is its versatility.</p>
<p>The same programming language can be used for completely different types of projects.</p>
<p>For example, Python can be used to:</p>
<ul>
<li><p>Automate repetitive tasks</p>
</li>
<li><p>Build web applications</p>
</li>
<li><p>Work with APIs</p>
</li>
<li><p>Analyze data</p>
</li>
<li><p>Create visualizations</p>
</li>
<li><p>Build Machine Learning models</p>
</li>
<li><p>Work with Artificial Intelligence</p>
</li>
<li><p>Process images and videos</p>
</li>
<li><p>Create games</p>
</li>
<li><p>Build command-line tools</p>
</li>
<li><p>Interact with databases</p>
</li>
<li><p>Create scripts for system administration</p>
</li>
<li><p>Build backend services</p>
</li>
</ul>
<p>This means that learning Python gives us a foundation that can be applied to many different areas of technology.</p>
<hr />
<h1>What Can Python Do?</h1>
<p>Let's look at some examples.</p>
<h2>1. Virtual Assistants</h2>
<p>Python can be used to create a <strong>virtual assistant</strong> that can respond to commands and perform predefined tasks.</p>
<p>For example, a virtual assistant could:</p>
<ul>
<li><p>Take voice commands</p>
</li>
<li><p>Search for information</p>
</li>
<li><p>Open applications</p>
</li>
<li><p>Tell the current time</p>
</li>
<li><p>Play music</p>
</li>
<li><p>Automate simple tasks</p>
</li>
</ul>
<p>In this repository, one of the projects is:</p>
<p><strong>Jarvis Virtual Assistant</strong></p>
<p>The project demonstrates how Python can be used to create an interactive application rather than just a simple script.</p>
<p>We will learn the concepts required for projects like this gradually.</p>
<hr />
<h1>2. Automation</h1>
<p>Automation is one of the most practical uses of Python.</p>
<p>Imagine having to perform the same task hundreds of times manually.</p>
<p>Instead of doing it manually, Python can perform the task automatically.</p>
<p>For example, Python can be used to:</p>
<ul>
<li><p>Rename hundreds of files</p>
</li>
<li><p>Organize files into folders</p>
</li>
<li><p>Generate reports</p>
</li>
<li><p>Process text files</p>
</li>
<li><p>Download data</p>
</li>
<li><p>Send automated emails</p>
</li>
<li><p>Interact with APIs</p>
</li>
<li><p>Execute system commands</p>
</li>
<li><p>Automate repetitive workflows</p>
</li>
</ul>
<p>This is particularly useful in software engineering, DevOps, data processing, and system administration.</p>
<hr />
<h1>3. Web Scraping</h1>
<p>Python can also be used to collect information from websites through <strong>web scraping</strong>, where permitted by the website's terms and technical restrictions.</p>
<p>For example, a Python program can extract structured information from web pages and process it automatically.</p>
<p>Common tools include:</p>
<ul>
<li><p>Beautiful Soup</p>
</li>
<li><p>Requests</p>
</li>
<li><p>Selenium</p>
</li>
<li><p>Scrapy</p>
</li>
</ul>
<p>Web scraping can be useful for:</p>
<ul>
<li><p>Research</p>
</li>
<li><p>Data collection</p>
</li>
<li><p>Price monitoring</p>
</li>
<li><p>Information aggregation</p>
</li>
<li><p>Testing</p>
</li>
<li><p>Internal automation</p>
</li>
</ul>
<p>The important thing is to use scraping responsibly and respect the website's terms, robots rules, rate limits, and applicable laws.</p>
<hr />
<h1>4. Web Development</h1>
<p>Python can be used to build the backend of web applications.</p>
<p>Popular Python frameworks include:</p>
<ul>
<li><p><code>Django</code></p>
</li>
<li><p><code>Flask</code></p>
</li>
<li><p><code>FastAPI</code></p>
</li>
</ul>
<p>These frameworks can be used to build:</p>
<ul>
<li><p>Websites</p>
</li>
<li><p>REST APIs</p>
</li>
<li><p>Backend services</p>
</li>
<li><p>Authentication systems</p>
</li>
<li><p>Database-driven applications</p>
</li>
</ul>
<p>For example, <strong>Flask</strong> is a lightweight Python web framework that can be used to create web applications and APIs.</p>
<hr />
<h1>5. Face Recognition and Computer Vision</h1>
<p>Python is heavily used in <strong>Computer Vision</strong>, a field that allows computers to process and understand images and videos.</p>
<p>Popular tools include:</p>
<ul>
<li><p><code>OpenCV</code></p>
</li>
<li><p><code>NumPy</code></p>
</li>
<li><p><code>MediaPipe</code></p>
</li>
<li><p><code>PyTorch</code></p>
</li>
<li><p><code>TensorFlow</code></p>
</li>
</ul>
<p>In this repository, we have a:</p>
<p><strong>Face Recognition</strong></p>
<p>project.</p>
<p>This gives us an idea of how Python can move beyond text-based programs and interact with visual data.</p>
<p>Later in our learning journey, we can explore the concepts behind these applications in much greater detail.</p>
<hr />
<h1>6. Games</h1>
<p>Python can also be used to create games.</p>
<p>A popular library for this is:</p>
<p><code>Pygame</code></p>
<p>In this repository, we have two game projects:</p>
<ul>
<li><p>Flappy Bird Game</p>
</li>
<li><p>Snake Game</p>
</li>
</ul>
<p>Games are a fun way to understand programming concepts such as:</p>
<ul>
<li><p>Variables</p>
</li>
<li><p>Conditions</p>
</li>
<li><p>Loops</p>
</li>
<li><p>Functions</p>
</li>
<li><p>Events</p>
</li>
<li><p>Coordinates</p>
</li>
<li><p>Collision detection</p>
</li>
<li><p>Game state</p>
</li>
<li><p>Object-oriented programming</p>
</li>
</ul>
<p>These projects can turn programming concepts into something visual and interactive.</p>
<hr />
<h1>7. Data Analysis</h1>
<p>Python is one of the most widely used languages for working with data.</p>
<p>Python can be used to:</p>
<ul>
<li><p>Load datasets</p>
</li>
<li><p>Clean data</p>
</li>
<li><p>Transform data</p>
</li>
<li><p>Analyze patterns</p>
</li>
<li><p>Calculate statistics</p>
</li>
<li><p>Generate reports</p>
</li>
<li><p>Create visualizations</p>
</li>
</ul>
<p>Popular libraries include:</p>
<ul>
<li><p><code>NumPy</code></p>
</li>
<li><p><code>Pandas</code></p>
</li>
<li><p><code>Matplotlib</code></p>
</li>
<li><p><code>Seaborn</code></p>
</li>
<li><p><code>Plotly</code></p>
</li>
</ul>
<p>For example, a company could use Python to analyze sales data and identify trends.</p>
<hr />
<h1>8. Artificial Intelligence and Machine Learning</h1>
<p>Python is extremely popular in <strong>Artificial Intelligence (AI)</strong> and <strong>Machine Learning (ML)</strong>.</p>
<p>Machine Learning allows computers to learn patterns from data and make predictions or decisions.</p>
<p>Python provides a huge ecosystem for this field.</p>
<p>Some important tools include:</p>
<ul>
<li><p><code>Scikit-learn</code></p>
</li>
<li><p><code>TensorFlow</code></p>
</li>
<li><p><code>PyTorch</code></p>
</li>
<li><p><code>Hugging Face Transformers</code></p>
</li>
</ul>
<p>Later in our learning journey, Python will become the foundation for exploring:</p>
<p><strong>Python → NumPy → Pandas → Machine Learning → Deep Learning → Generative AI → RAG → AI Agents</strong></p>
<p>So the fundamentals we learn now will become important later.</p>
<hr />
<h1>9. DevOps and Cloud Automation</h1>
<p>Python is also useful in <strong>DevOps and Cloud Engineering</strong>.</p>
<p>Python scripts can be used to automate infrastructure and operational tasks.</p>
<p>For example:</p>
<ul>
<li><p>Automating AWS operations</p>
</li>
<li><p>Working with cloud APIs</p>
</li>
<li><p>Processing logs</p>
</li>
<li><p>Monitoring systems</p>
</li>
<li><p>Automating deployments</p>
</li>
<li><p>Managing files and servers</p>
</li>
<li><p>Creating operational scripts</p>
</li>
</ul>
<p>Python can work alongside technologies such as:</p>
<ul>
<li><p>AWS</p>
</li>
<li><p>Docker</p>
</li>
<li><p>Kubernetes</p>
</li>
<li><p>Terraform</p>
</li>
<li><p>Jenkins</p>
</li>
<li><p>Ansible</p>
</li>
</ul>
<p>This makes Python a valuable automation language for engineers as well.</p>
<hr />
<h1>Projects in This Repository</h1>
<p>To make this learning journey practical, our repository will gradually contain different Python projects.</p>
<p>Current Day 2 examples include:</p>
<h3>1. Jarvis Virtual Assistant</h3>
<p>An interactive Python-based virtual assistant.</p>
<h3>2. Love Calculator</h3>
<p>A simple project demonstrating how programming can be used to create an interactive application.</p>
<h3>3. Face Recognition</h3>
<p>An introduction to applying Python to computer vision.</p>
<h3>4. Flappy Bird Game</h3>
<p>A Python game project demonstrating interactive programming.</p>
<h3>5. Snake Game</h3>
<p>Another game project that can help us understand programming logic and game mechanics.</p>
<p>These projects are examples of <strong>what Python can eventually help us build</strong>.</p>
<p>We should not worry about understanding every line of these projects immediately.</p>
<hr />
<h1>Don't Try to Learn Everything at Once</h1>
<p>If you are a beginner, seeing projects such as AI applications, games, or virtual assistants can feel overwhelming.</p>
<p>Don't worry.</p>
<p>We are not going to jump directly into advanced projects.</p>
<p>Instead, we will build our knowledge step by step.</p>
<p>For example:</p>
<pre><code class="language-text">Python Fundamentals
        ↓
Variables &amp; Data Types
        ↓
Operators
        ↓
Conditions
        ↓
Loops
        ↓
Functions
        ↓
Data Structures
        ↓
Object-Oriented Programming
        ↓
Modules &amp; Packages
        ↓
Libraries &amp; Frameworks
        ↓
Projects
        ↓
Advanced Python
        ↓
AI / ML / Automation / Backend / Data
</code></pre>
<p>Every advanced project is built from smaller programming concepts.</p>
<hr />
<h1>What I Want to Achieve with These 100 Days</h1>
<p>The purpose of this challenge is not simply to complete 100 files.</p>
<p>The goal is to actually understand Python and develop the ability to use it to solve problems.</p>
<p>Throughout these 100 days, I want to:</p>
<ul>
<li><p>Understand Python fundamentals</p>
</li>
<li><p>Write Python programs independently</p>
</li>
<li><p>Improve problem-solving skills</p>
</li>
<li><p>Build practical projects</p>
</li>
<li><p>Learn important Python libraries</p>
</li>
<li><p>Understand how Python is used in real-world technology</p>
</li>
<li><p>Create a permanent reference of my learning</p>
</li>
<li><p>Build a foundation for future AI/ML and automation work</p>
</li>
</ul>
<p>The code and notes in this repository will document that progress.</p>
<hr />
<h1>Day 2 Takeaways</h1>
<p>Python is a general-purpose language that can be used for many different types of applications.</p>
<p>Some major areas where Python is used are:</p>
<table>
<thead>
<tr>
<th>Area</th>
<th>Examples</th>
</tr>
</thead>
<tbody><tr>
<td>Automation</td>
<td><code>Scripts</code>, <code>file processing</code>, <code>task automation</code></td>
</tr>
<tr>
<td>Web Development</td>
<td><code>Django</code>, <code>Flask</code>, <code>FastAPI</code></td>
</tr>
<tr>
<td>Data Analysis</td>
<td><code>NumPy</code>, <code>Pandas</code></td>
</tr>
<tr>
<td>Data Visualization</td>
<td><code>Matplotlib</code>, <code>Seaborn</code>, <code>Plotly</code></td>
</tr>
<tr>
<td>AI/ML</td>
<td><code>Scikit-learn</code>, <code>TensorFlow</code>, <code>PyTorch</code></td>
</tr>
<tr>
<td>Computer Vision</td>
<td><code>OpenCV</code></td>
</tr>
<tr>
<td>Games</td>
<td><code>Pygame</code></td>
</tr>
<tr>
<td>Web Scraping</td>
<td><code>Beautiful Soup</code>, <code>Selenium</code>, <code>Scrapy</code></td>
</tr>
<tr>
<td>DevOps</td>
<td><code>Cloud and infrastructure automation</code></td>
</tr>
<tr>
<td>Backend Development</td>
<td><code>APIs and services</code></td>
</tr>
</tbody></table>
<hr />
<h1>Final Thought</h1>
<p>Learning Python is not about memorizing hundreds of commands.</p>
<p>It is about learning how to <strong>think, solve problems, and turn those solutions into working programs</strong>.</p>
<p>Today we only looked at what Python can do.</p>
<p>As we progress through these 100 days, we will gradually learn the concepts required to build these kinds of applications ourselves.</p>
<p><strong>Day 2 complete.</strong></p>
<p><strong>Next: Let's start learning the actual building blocks of Python.</strong></p>
<hr />
<h2>📂 Day 2 Resources</h2>
<p>👉 All notes and code for this day are available in the GitHub repository:</p>
<p><a class="embed-card" href="https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/02-Day02-Applications-of-Python">https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/02-Day02-Applications-of-Python</a></p>

<hr />
]]></content:encoded></item><item><title><![CDATA[Day 1 - Introduction to Python]]></title><description><![CDATA[Welcome to Day 1 of 100 Days of Python!
In this series, we will start from the fundamentals of Python and gradually move toward more advanced concepts. The goal is to build a strong Python foundation ]]></description><link>https://sritesh-tech-journal.hashnode.dev/day-1-introduction-to-python</link><guid isPermaLink="true">https://sritesh-tech-journal.hashnode.dev/day-1-introduction-to-python</guid><category><![CDATA[100 days of python	]]></category><category><![CDATA[Python]]></category><category><![CDATA[Python 3]]></category><dc:creator><![CDATA[SRITESH SURANJAN]]></dc:creator><pubDate>Sat, 12 Sep 2026 03:08:26 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/aab22268-a502-4f3a-8686-0d9b6d0f3ce3.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<img src="https://cdn.hashnode.com/uploads/covers/664f77938fc1f806b829b90b/5dc0f5c1-e624-4ffd-a122-3c41ec2c227d.jpg" alt="" style="display:block;margin:0 auto" />

<p>Welcome to <strong>Day 1 of 100 Days of Python!</strong></p>
<p>In this series, we will start from the fundamentals of Python and gradually move toward more advanced concepts. The goal is to build a strong Python foundation that can later be used for <strong>automation, software development, data analysis, AI/ML, and other technical domains</strong>.</p>
<hr />
<h2>What is Programming?</h2>
<p>Programming is the process of giving instructions to a computer so that it can perform a specific task.</p>
<p>A computer is extremely powerful at performing calculations and following instructions, but it does not independently understand what we want it to do. We have to provide instructions in a language that the computer can understand.</p>
<p>For example:</p>
<p>If I ask you:</p>
<pre><code class="language-text">5 + 6
</code></pre>
<p>You can immediately answer:</p>
<pre><code class="language-text">11
</code></pre>
<p>But what about a calculation such as:</p>
<pre><code class="language-text">23453453 × 56456
</code></pre>
<p>You might use a calculator or another tool to get the answer.</p>
<p>Computers, however, are extremely good at performing such repetitive and complex calculations. Programming allows us to <strong>instruct computers to perform these tasks automatically and efficiently</strong>.</p>
<p>In simple terms:</p>
<blockquote>
<p><strong>Programming is the process of writing instructions that tell a computer what to do.</strong></p>
</blockquote>
<p>Throughout this 100 Days of Python journey, we will start with the fundamentals and gradually build our programming skills.</p>
<hr />
<h1>What is Python?</h1>
<p>Python is a <strong>high-level, general-purpose programming language</strong> known for its simple and readable syntax.</p>
<p>It supports multiple programming paradigms, including:</p>
<ul>
<li><p>Object-Oriented Programming (OOP)</p>
</li>
<li><p>Procedural Programming</p>
</li>
<li><p>Functional Programming</p>
</li>
</ul>
<p>Python is also <strong>dynamically typed</strong>, which means that you generally do not have to explicitly declare the data type of a variable when creating it.</p>
<p>For example:</p>
<pre><code class="language-python">name = "Sritesh"
age = 23
</code></pre>
<p>Python automatically determines the appropriate types for these values.</p>
<p>Python was created by <strong>Guido van Rossum</strong>. Its development began in the late 1980s, and Python was first released publicly in <strong>1991</strong>.</p>
<hr />
<h1>Features of Python</h1>
<h2>1. Simple and Readable</h2>
<p>Python has a clean and relatively easy-to-understand syntax.</p>
<p>For example:</p>
<pre><code class="language-python">print("Hello, World!")
</code></pre>
<p>This simplicity makes Python particularly suitable for beginners.</p>
<hr />
<h2>2. High-Level Language</h2>
<p>Python is a high-level programming language, meaning that its syntax is relatively close to human language compared with lower-level programming languages.</p>
<p>This allows developers to focus more on solving problems rather than managing low-level computer operations.</p>
<hr />
<h2>3. Dynamically Typed</h2>
<p>Python is dynamically typed.</p>
<p>For example:</p>
<pre><code class="language-python">name = "Sritesh"
age = 23
</code></pre>
<p>We don't have to explicitly write the data type before the variable.</p>
<p>Python determines the type at runtime.</p>
<hr />
<h2>4. Interpreted</h2>
<p>Python programs are executed by the Python interpreter.</p>
<p>This makes the development process convenient because we can quickly write, execute, test, and modify our code.</p>
<hr />
<h2>5. Cross-Platform</h2>
<p>Python is available on major operating systems such as:</p>
<ul>
<li><p>Windows</p>
</li>
<li><p>Linux</p>
</li>
<li><p>macOS</p>
</li>
</ul>
<p>Therefore, Python programs can generally be developed and executed across different platforms with little or no modification.</p>
<hr />
<h2>6. Open Source</h2>
<p>Python is open-source software.</p>
<p>Its source code is publicly available, and a large global community contributes to its ecosystem.</p>
<hr />
<h2>7. Large Ecosystem and Library Support</h2>
<p>One of Python's biggest strengths is its huge ecosystem of libraries and frameworks.</p>
<p>Some popular Python libraries and frameworks include:</p>
<ul>
<li><p>NumPy</p>
</li>
<li><p>Pandas</p>
</li>
<li><p>Matplotlib</p>
</li>
<li><p>TensorFlow</p>
</li>
<li><p>PyTorch</p>
</li>
<li><p>OpenCV</p>
</li>
<li><p>Selenium</p>
</li>
<li><p>FastAPI</p>
</li>
<li><p>Django</p>
</li>
</ul>
<p>These libraries allow developers to build applications without implementing every feature from scratch.</p>
<hr />
<h2>8. Supports Multiple Programming Paradigms</h2>
<p>Python supports different programming approaches, including:</p>
<ul>
<li><p>Procedural programming</p>
</li>
<li><p>Object-oriented programming</p>
</li>
<li><p>Functional programming</p>
</li>
</ul>
<p>This makes Python flexible enough for many different types of applications.</p>
<hr />
<h1>What is Python Used For?</h1>
<p>Python is used in many different areas of technology.</p>
<h2>1. Data Analysis</h2>
<p>Python is widely used to process, clean, analyze, and understand data.</p>
<p>Popular tools include:</p>
<ul>
<li><p>Pandas</p>
</li>
<li><p>NumPy</p>
</li>
</ul>
<hr />
<h2>2. Data Visualization</h2>
<p>Python can be used to create charts, graphs, and other visual representations of data.</p>
<p>Popular libraries include:</p>
<ul>
<li><p>Matplotlib</p>
</li>
<li><p>Seaborn</p>
</li>
<li><p>Plotly</p>
</li>
</ul>
<hr />
<h2>3. Artificial Intelligence and Machine Learning</h2>
<p>Python is one of the most popular programming languages for <strong>Artificial Intelligence (AI)</strong> and <strong>Machine Learning (ML)</strong>.</p>
<p>It is used to build models that can learn patterns from data and make predictions or decisions.</p>
<p>Popular tools include:</p>
<ul>
<li><p>Scikit-learn</p>
</li>
<li><p>TensorFlow</p>
</li>
<li><p>PyTorch</p>
</li>
<li><p>Hugging Face Transformers</p>
</li>
</ul>
<hr />
<h2>4. Web Development</h2>
<p>Python can be used to build web applications and backend services.</p>
<p>Popular frameworks include:</p>
<ul>
<li><p>Django</p>
</li>
<li><p>Flask</p>
</li>
<li><p>FastAPI</p>
</li>
</ul>
<hr />
<h2>5. Automation and Scripting</h2>
<p>Python is excellent for automating repetitive tasks.</p>
<p>For example, Python can be used to:</p>
<ul>
<li><p>Rename files</p>
</li>
<li><p>Process large numbers of files</p>
</li>
<li><p>Automate reports</p>
</li>
<li><p>Interact with APIs</p>
</li>
<li><p>Automate system tasks</p>
</li>
<li><p>Perform DevOps-related tasks</p>
</li>
</ul>
<p>This is one of the areas where Python becomes particularly useful for practical engineering work.</p>
<hr />
<h2>6. Computer Vision</h2>
<p>Python is widely used for image and video processing.</p>
<p>Libraries such as <strong>OpenCV</strong> can be used for tasks including:</p>
<ul>
<li><p>Image processing</p>
</li>
<li><p>Object detection</p>
</li>
<li><p>Face detection</p>
</li>
<li><p>Video processing</p>
</li>
</ul>
<hr />
<h2>7. Database Applications</h2>
<p>Python can communicate with databases and can be used to:</p>
<ul>
<li><p>Store data</p>
</li>
<li><p>Retrieve data</p>
</li>
<li><p>Update records</p>
</li>
<li><p>Delete records</p>
</li>
<li><p>Build database-driven applications</p>
</li>
</ul>
<hr />
<h2>8. Scientific and Mathematical Computing</h2>
<p>Python is also widely used for scientific computing, numerical analysis, simulations, and complex mathematical operations.</p>
<p>Libraries such as NumPy and SciPy provide powerful tools for these tasks.</p>
<hr />
<h1>Our First Python Program</h1>
<p>Let's write our first Python program:</p>
<pre><code class="language-python">print("Hello World!")
</code></pre>
<p>The <code>print()</code> function is used to display information on the screen.</p>
<p>We can also print numbers:</p>
<pre><code class="language-python">print(7)
</code></pre>
<p>We can even perform calculations:</p>
<pre><code class="language-python">print(5 + 6)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">11
</code></pre>
<hr />
<h1>Day 1 Code</h1>
<p>Our <code>main.py</code> file contains:</p>
<pre><code class="language-python">print("Hello World!")
print(7)
</code></pre>
<p>Output:</p>
<pre><code class="language-text">Hello World!
7
</code></pre>
<hr />
<h1>Quick Revision</h1>
<h3>Programming</h3>
<p>Programming is the process of writing instructions that tell a computer what to do.</p>
<h3>Python</h3>
<p>Python is a high-level, general-purpose, dynamically typed programming language.</p>
<h3>Python Creator</h3>
<p>Python was created by <strong>Guido van Rossum</strong>.</p>
<h3>First Public Release</h3>
<p>Python was first publicly released in <strong>1991</strong>.</p>
<h3>Major Features</h3>
<ul>
<li><p>Simple and readable</p>
</li>
<li><p>High-level</p>
</li>
<li><p>Dynamically typed</p>
</li>
<li><p>Interpreted</p>
</li>
<li><p>Cross-platform</p>
</li>
<li><p>Open source</p>
</li>
<li><p>Large ecosystem</p>
</li>
<li><p>Supports multiple programming paradigms</p>
</li>
</ul>
<h3>Major Uses</h3>
<ul>
<li><p>Software development</p>
</li>
<li><p>Automation</p>
</li>
<li><p>Web development</p>
</li>
<li><p>Data analysis</p>
</li>
<li><p>Data visualization</p>
</li>
<li><p>Artificial Intelligence</p>
</li>
<li><p>Machine Learning</p>
</li>
<li><p>Computer vision</p>
</li>
<li><p>Scientific computing</p>
</li>
<li><p>Database applications</p>
</li>
</ul>
<hr />
<h1>Key Takeaway</h1>
<p>Python is more than just a beginner-friendly programming language.</p>
<p>Its simple syntax combined with a massive ecosystem makes it useful across many areas of technology—from <strong>automation and backend development to Data Science, Machine Learning, Artificial Intelligence, and Generative AI</strong>.</p>
<p>This is only Day 1.</p>
<p>The real journey starts now.</p>
<p><strong>100 Days. One language. One step at a time.</strong></p>
<hr />
<h2>📂 Day 1 Resources</h2>
<p>👉 All notes and code for this day are available in the GitHub repository:</p>
<p><a class="embed-card" href="https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/01-Day01-Introduction-to-Python">https://github.com/SriteshSuranjan/100-Days-of-Python/tree/main/01-Day01-Introduction-to-Python</a></p>

<hr />
]]></content:encoded></item></channel></rss>