A personal Python learning repository containing programming exercises, practice implementations, and mini-projects developed throughout my learning journey.
This repository contains my practice work for Lecture 02 of my Python learning journey.
The lecture focuses on working with strings, indexing, slicing, built-in string functions, and making decisions using conditional statements.
- Creating Strings (Single, Double, Multi-line)
- String Methods
- Escape Sequences (
\n,\t)
- Positive Indexing
- Negative Indexing
- String Slicing (
[start:end:step]) - Negative Slicing & String Reversal
- Built-in Functions (
len(),type()) - String Transformations (
.lower(),.upper(),.find(),.replace()) - Combining Functions with Operations
ifStatementselifChainselseFallbacks- Nested Conditions & Logical Operators
| File | Topics | Questions |
|---|---|---|
01_strings.py |
Strings, String Methods, Escape Sequences | 7 |
02_indexing_and_slicing.py |
Positive/Negative Indexing, Slicing, Step Values | 7 |
03_string_functions.py |
Built-in Functions, Length, String Manipulation | 7 |
04_conditional_statements.py |
if, elif, else, Logical & Comparison Conditions |
7 |
05_mini_project.py |
Interactive Text Analyzer & Decision Engine | Mini Project |
By completing this lecture, you will learn how to:
- Create and manipulate multi-line and single-line strings.
- Apply common string methods and escape sequences.
- Access characters using both positive and negative indexing.
- Extract custom substrings using slicing and step modifiers.
- Calculate string lengths and execute text transformations.
- Implement decision-making logic using
if,elif, andelse. - Combine comparison and logical operators to build robust conditions.
- Build interactive Python programs based on user input and dynamic logic.
The final file integrates all Lecture 02 concepts into an interactive Python program.
- Key Concepts Used: Strings, Indexing, Slicing, String Functions, Conditional Logic (
if/elif/else), and User Input (input()). - Functionality: Accepts user text input, analyzes string characteristics (length, casing, sub-string presence), extracts key segments via slicing, and executes conditional logic based on calculated metrics.
- Lecture 01 — Python Fundamentals
- Lecture 02 — Strings & Conditional Statements
- Lecture 03 — Pending
- Lecture 04 — Pending
- Lecture 05 — Pending
- Lecture 06 — Pending
- Lecture 07 — Pending
- Lecture 08 — Pending
- Lecture 09 — Pending