> For the complete documentation index, see [llms.txt](https://ai-javaher.gitbook.io/pythonclass/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-javaher.gitbook.io/pythonclass/python-workshops/introduction-to-python.md).

# Introduction to Python

Welcome to the **Introduction** **to** **Python** session! This tutorial is designed to introduce absolute beginners to Python programming. By the end of this session, you’ll understand how to write your first Python program, use comments effectively, handle errors, and work with essential data types such as strings, numbers, and booleans.

### Topics Covered in This Session

1. **Hello World**

Writing your first Python program is an exciting start to your coding journey. The "Hello World" program is a simple script that prints a message to the screen, serving as an introduction to Python's syntax.

2. **Comments:**

Comments are notes added to your Python code to make it easier to understand. Python ignores comments when running the code.

3. **Errors**

Errors occur when Python encounters an issue in your code that prevents it from running. Python provides clear error messages to help you debug.

4. **Assigning:**&#x20;

What does it mean by variables and how to assign values to them in Python? This involves choosing a name for a variable and associating a value with it. Selecting an appropriate variable name is crucial, and there are some important rules and limitations to consider in the naming process.&#x20;

<figure><img src="https://2998778153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHvRLCXcxmjwW0q4dXdh5%2Fuploads%2Fmc9nu9Vf1LGBrdE5M6Vy%2Fboxesvaribales.png?alt=media&amp;token=62e572a0-8e01-4111-b657-08f958ac9058" alt="" width="563"><figcaption><p>A variable is like a box to store values</p></figcaption></figure>

5. **DataTypes**

We will explore fundamental data types such as **numerics**, **booleans**, and **strings** along with additional functions associated with each.&#x20;

<figure><img src="https://2998778153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHvRLCXcxmjwW0q4dXdh5%2Fuploads%2FIe32M9GyOSr1OavS7ovP%2Fnumbers.png?alt=media&amp;token=222aaf97-ef75-46f7-83a1-691727eb5a82" alt="" width="563"><figcaption><p>The Python programming language supports numbers and letters in various data types</p></figcaption></figure>

**5.1. Numeric:**

Numeric data types include integers (int) for whole numbers and floating-point numbers (float) for decimals. These types are used to represent and perform operations on numerical values.

**5.2. Boolean:**

Boolean data type (bool) represents binary values, True or False, used for logical operations and decision-making in programming. Booleans are integral to control flow and conditional statements in Python code.

**5.3. String:**

Strings (str) are sequences of characters enclosed in quotes, and they are versatile for representing text. String manipulation and operations make them fundamental for handling textual data.

{% embed url="<https://www.youtube.com/watch?v=by_9kskKeCM>" %}

## Introduction to Python Document 📚

{% file src="/files/ojKHABH5M4FKj9UHa5WM" %}

***
