This repository contains the assignments completed as part of CS50P: Introduction to Programming with Python, a course by Harvard University. Each assignment explores different programming concepts and Python fundamentals, progressively building skills from basic to more advanced topics. This repository also has codes that I wrote from my own ideas to reinforce these concepts and they are prefixed with "Idea"
The following is a list of assignments in this repository:
-
Indoor Voice
Convert text input to lowercase. -
Playback Speed
Simulate audio playback speed with text output. -
Making Faces
Replace emoticons like:)and:(with corresponding emoji. -
Einstein
Implement Einstein’s equation to calculate energy from mass. -
Tip Calculator
Create a simple tip calculator to compute gratuities based on the total bill. -
Deep Thought
Simulate a response from the fictional supercomputer Deep Thought. -
Home Federal Savings Bank
Simulate bank account behavior using conditionals and inputs. -
File Extensions
Detect and categorize file types based on their extensions. -
Math Interpreter
Create a simple interpreter that evaluates mathematical expressions. -
Meal Time
Determine if it’s breakfast, lunch, or dinner time based on the current time. -
camelCase
Convert snake_case variables to camelCase. -
Coke Machine
Simulate a vending machine that dispenses Coke and returns change. -
Just setting up my twttr
Shorten names by removing vowels, mimicking Twitter’s early tagline. -
Vanity Plates
Validate custom license plate numbers according to specific rules. -
Nutrition Facts
Compute the calories of different foods based on user input. -
Fuel Gauge
Convert a fuel level from a fraction to a percentage and display a message. -
Felipe’s Taqueria
Take orders from a menu and calculate the total cost. -
Grocery List
Create a program to add items to a grocery list and print it. -
Outdated
Reformat dates into a standardized format (YYYY-MM-DD). -
Emojize
Convert plain text with emoticon codes into their respective emoji. -
Frank, Ian, and Glen’s Letters
Manipulate strings to meet a specific character format for input. -
Adieu, Adieu
Format farewells for multiple people in a list-like structure. -
Guessing Game
Create a number-guessing game where the user tries to guess a secret number. -
Little Professor
Generate random math problems and quiz users on addition. -
Bitcoin Price Index
Fetch the current Bitcoin price using an API and display it. -
Testing my twttr
Write unit tests to validate functionality of the twttr program. -
Back to the Bank
Simulate more complex banking operations, handling deposits and withdrawals. -
Re-requesting a Vanity Plate
Enhance the vanity plate validation program with additional features. -
Refueling
Improve the fuel gauge program with additional error handling and features. -
Lines of Code
Count the number of lines in a given file, ignoring comments and empty lines. -
Pizza Py
Create a menu system to order pizza and calculate the total price. -
Scourgify
Clean up messy data in a CSV file by reformatting it. -
CS50 P-Shirt
Personalize a T-shirt design by adding custom text to an image using Python. -
NUMB3RS
Validate if numbers meet certain criteria, like being prime or within a range. -
Watch on YouTube
Provide a simple interface for searching and playing YouTube videos. -
Working 9 to 5
Track working hours and calculate pay based on hours logged. -
Regular, um, Expressions
Work with regular expressions to validate and manipulate strings. -
Response Validation
Write code to validate user responses using conditionals and loops. -
Seasons of Love
Calculate the number of days since a certain date and output a message. -
Cookie Jar
Simulate a cookie jar with withdrawal and deposit functionality. -
CS50 Shirtificate
Generate personalized certificates by placing text on an image.
Each assignment can be run individually by navigating to the relevant directory and executing the Python script:
python filename.py