Posts

Showing posts from April, 2025

Variables

Image
  Variables 📄 Python Script Documentation: Personal Introduction with Variables Overview: This Python script demonstrates the use of string variables and different ways to concatenate or format strings for output. It introduces a character named Topsee , presenting his ambitions and current progress. Code: # Declaring a variable to store the name name = "Topsee"   # Printing statements using different string concatenation techniques print("My name is " + name + ".")               # Using string concatenation with '+' print(f"My name is {name}.")                    # Using f-string (formatted string)   # More personalized outputs print(name + " wants to learn Python.")         print(name + " wants to go abroad.")        ...

Python Programming Basic

Image
  📘 Python Basics Documentation This document explains how to set up a Python file and covers some of the foundational concepts such as data types, printing values, comments, escape sequences, and variables. 🗂️ Creating a Python File To start coding in Python, you need to create a `.py` file. Here’s how to do it: 1. Create a folder (example: `pythonclass`) to store your Python projects. 2. Inside that folder, right-click and choose:    New → Python File    Name your file (e.g., `first_script.py`). 🔢 Python Data Types Python supports various data types. Below are some of the basic ones: 1. Integer Whole numbers without a decimal point. print(10) 2. Floating Point / Decimal Numbers with decimal points. print(10.5) 3. String A sequence of characters. Strings can be enclosed in either single (`'`) or double (`"`) quotes. print("Topu") print('Topu') 💬 Comments in Python Comments are notes in your code that...