Python Projects for Beginners: 10 Projects with Code - Python with AI tutorial chapter 47
Python

Python Projects for Beginners: 10 Projects with Code

These Python projects for beginners are ten small, complete programs that each solve a real office task: invoices, deadlines, expenses, exchange rates, a sales chart and an AI meeting summary. Every project is under 30 lines, runs on Python 3.12, prints a result you can check, and lists the course chapters it uses so you […]

Python NumPy Basics: Arrays, Indexing and Calculations - Python with AI tutorial chapter 37
Python

Python NumPy Basics: Arrays, Indexing and Calculations

Python NumPy is the library for fast numerical work. Its core object, the ndarray, stores numbers of one type in a compact block of memory and lets you calculate on thousands of values with a single expression instead of a loop. NumPy also powers pandas, Matplotlib and most data science tools, so learning it pays […]

Python Dictionaries: Key-Value Pairs with Examples - Python with AI tutorial chapter 16
Python

Python Dictionaries: Key-Value Pairs with Examples

Python dictionaries store data as key-value pairs inside curly braces, such as {“name”: “Anita”, “dept”: “Finance”}. You look values up by key instead of by position, which makes a dictionary the natural shape for a record, a lookup table or a set of counts. This chapter covers creating Python dictionaries, reading and updating values, looping, […]

Python File Handling: Open, Read, Write and Delete Files - Python with AI tutorial chapter 30
Python

Python File Handling: Open, Read, Write and Delete Files

Python file handling means creating, reading, writing, appending and deleting files from your scripts. The built-in open() function and the with statement do the reading and writing, while pathlib handles paths, folders and file operations in a way that works identically on Windows, Mac and Linux. Almost every automation touches a file: a log to […]

Debug Python Code with AI: Read Errors and Fix Them Fast - Python with AI tutorial chapter 46
Python

Debug Python Code with AI: Read Errors and Fix Them Fast

To debug Python code with AI you first read the traceback yourself, isolate the failing line, then paste the error and the surrounding code into an assistant with enough context for a precise answer. This chapter covers how tracebacks are structured, the eight error messages you will meet most often, the prompt that gets useful […]

Python Sets: Unique Items, Union and Intersection - Python with AI tutorial chapter 15
Python

Python Sets: Unique Items, Union and Intersection

Python sets are unordered collections of unique items, written in curly braces such as {“North”, “South”, “East”}. Add a value that is already present and nothing happens, which makes sets the fastest way to remove duplicates, test membership and compare two groups. This chapter covers creating Python sets, adding and removing items, and the union, […]

Python User Input: input() and Validation - Python with AI tutorial chapter 24
Python

Python User Input: input() and Validation

Python user input is read with the built-in input() function. It pauses the program, shows an optional prompt, waits for the person to type something and press Enter, and returns whatever they typed as a string. Because the result is always text, you must convert and validate it before using it in calculations, usually inside […]

Python RegEx: re Module Patterns with Examples - Python with AI tutorial chapter 29
Python

Python RegEx: re Module Patterns with Examples

Python regex (regular expressions) is pattern matching for text, provided by the built-in re module. Instead of checking for one fixed word, you describe a shape: “three letters, a dash, four digits” or “anything between angle brackets”. With search, findall, sub and fullmatch you can find, extract, replace and validate text in a few lines. […]

Automate Excel Reports with Python and AI - Python with AI tutorial chapter 45
Python

Automate Excel Reports with Python and AI

To automate Excel reports with Python and AI you let pandas do the calculations, openpyxl build a formatted workbook with a chart, and an AI API write the executive summary from the numbers you calculated. The result is a monthly report that takes one command instead of an afternoon, and a summary that is grounded […]

Python Tuples: Immutable Sequences with Examples - Python with AI tutorial chapter 14
Python

Python Tuples: Immutable Sequences with Examples

Python tuples are ordered collections that cannot be changed after they are created, written in parentheses such as (“Pune”, 411001, “India”). They hold records whose shape is fixed: a coordinate pair, a database row, the two values a function hands back. This chapter covers creating Python tuples, unpacking them, the few methods they have and […]