Welcome to my 100 Days of Python repository! This project documents my 100-day journey of writing Python code every single day. The goal of this marathon was to build a strong foundation in Python by solving progressively challenging programming problems.
This repository contains exactly 100 Python scripts, one for each day. The difficulty scales up over time, starting from very basic logic and arithmetic, and culminating in interactive, terminal-based applications that utilize file handling and data structures.
Over the course of 100 days, these practice codes cover a wide range of core Python concepts:
- Basics: Variables, I/O (
input()andprint()), Type Casting - Control Flow:
if-elif-elseconditions,forandwhileloops - Data Structures: Strings, Lists, Tuples, Sets, and Dictionaries
- Functions: Definition, Default Arguments, Returning Multiple Values
- Error Handling:
try-exceptblocks for safe execution - File I/O: Reading, Writing, and appending to
.txtand.jsonfiles - Modules: Using
random,datetime,os, andjson
Here are a few of the more complex projects built in the later days of the marathon:
097. File-Based Contact Book.py: A terminal contact book that persists data to a local text file.098. JSON Student Database.py: An interactive database that stores and retrieves student records using JSON.099. Command-Line Expense Tracker.py: A CLI app to log expenses, calculate totals, and save financial data.100. Build a CLI Python Calculator.py: The grand finale - a fully featured, error-handled calculator with an interactive menu and saved calculation history.
All scripts are standalone and require no external libraries. You can run any of them directly using standard Python 3.
# Clone the repository
git clone https://github.com/Hero-Harshit/python-marathon-100-days.git
# Navigate into the directory
cd python-marathon-100-days
# Run a specific day's script
python "100. Build a CLI Python Calculator.py"