Skip to content

dlukeh/cs50p

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 CS50P — Introduction to Programming with Python

A collection of all labs and the final project from Harvard’s CS50P course.

This repository documents my journey through CS50’s Introduction to Programming with Python. It includes all weekly labs and culminates in my final project: Nyra, a modular talking personal assistant.


🧰 Skills Demonstrated

  • Python fundamentals and clean code practices
  • Functions, loops, conditionals, and exception handling
  • File I/O and data persistence (JSON)
  • Regular expressions for flexible input parsing
  • Object-Oriented Programming (OOP)
  • External libraries (gTTS, pygame, requests)
  • Unit testing with pytest (including mocking and parameterization)
  • Command-line interfaces and user interaction

🗂 Repository Structure

Folder Type Description
lab0/ Lab Basic string manipulation and input/output
lab1/ Lab Conditionals and decision logic
lab2/ Lab Loops and iteration
lab3/ Lab Exceptions and file I/O
lab4/ Lab Using external libraries
lab5/ Lab Unit testing with pytest
lab6/ Lab Advanced file I/O and data processing
lab7/ Lab Regular expressions
final_project/ Final Project Nyra — A modular talking personal assistant with Text-to-Speech

🌟 Final Project: Nyra

Nyra is a command-line personal assistant that stands out with its natural Text-to-Speech capabilities.

Key Features

  • Calculator with float support and division-by-zero protection
  • Persistent memory (remember/recall) using JSON
  • File search and extractive summarization
  • Real-time web search via DuckDuckGo API
  • Natural voice output using gTTS + pygame
  • Clean OOP design with modular tools
  • Comprehensive unit tests

Watch Nyra Demo


📘 Lab Summaries

  • lab0 – Basics: String transformations, tip calculator, Einstein equation
  • lab1 – Conditionals: Bank greetings, meal times, basic interpreter
  • lab2 – Loops: CamelCase, vanity plates, nutrition lookup
  • lab3 – Exceptions & I/O: Fuel gauge, grocery list, taqueria orders
  • lab4 – Libraries: Emoji, Figlet, Bitcoin price, Professor quiz
  • lab5 – Unit Tests: Testing bank, fuel, plates, and Twitter functions
  • lab6 – File I/O: Lines of code counter, pizza CSV, scourgify, CS50 shirt
  • lab7 – Regular Expressions: IPv4 validation, YouTube extractor, time conversion, "um" counter

📌 Notes

  • All labs and the final project were completed using virtual environments on Linux.
  • Each folder is self-contained with its own code and documentation.
  • The final project (final_project/) demonstrates integration of multiple course concepts plus external TTS capabilities.

Repository Link: github.com/dlukeh/cs50p


How to Run the Final Project

cd final_project

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python project.py