https://github.com/nihalsheikh/cs50p
Course: CS50P INTRO TO PRAGRAMMING WITH PYTHON
https://github.com/nihalsheikh/cs50p
cs50p programming python
Last synced: 3 months ago
JSON representation
Course: CS50P INTRO TO PRAGRAMMING WITH PYTHON
- Host: GitHub
- URL: https://github.com/nihalsheikh/cs50p
- Owner: nihalsheikh
- Created: 2025-06-14T06:24:28.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-08-07T16:17:29.000Z (5 months ago)
- Last Synced: 2025-08-07T18:21:31.343Z (5 months ago)
- Topics: cs50p, programming, python
- Language: Python
- Homepage:
- Size: 58.9 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CS50P: Introduction to Programming with Python
This is a repository made to track practice python programming along with a goal of keeping track of my learnings and making that github heatmap green
## Index
| Week | Problem Set |
| ---- | ----------- |
| [week 0](#week-0-functions-and-variables) | [0](./week_0/problem_set_0/) |
| [week 1](#week-1-conditionals) | [1](./week_1/problem_set_1/) |
| [week 2](#week-2-loops) | [2](./week_2/problem_set_2/) |
| [week 3](#week-3-exceptions) | [3](./week_3/problem_set_3/) |
| [week 4](#week-4-libraries) | [4](./week_4/problem_set_4/) |
| [week 5](#week-5-unit-tests) | [5](./week_5/problem_set_5/) |
| [week 6](#week-6-file-io) | [6](./week_6/problem_set_6/) |
| [week 7](#week-7-regular-expressions) | [7](./week_7/problem_set_7/) |
| [week 8](#week-8-object-oriented-programming) | [8](./week_8/) |
- [Check Work Submission](https://submit.cs50.io/courses)
## Week 0: Functions and Variables
checkout the topics covered:
- [x] Functions
- [x] Arguements
- [x] Variables
- [x] Assignment Operator (=)
- [x] Comments
- [x] PseudoCode
- [x] Args seperated by comma
- [x] String or str
- [x] Practice python file => [here](./week_0/hello.py)
- [x] strip()
- [x] capitalize()
- [x] title()
- [x] split()
- [x] Method Chaining
- [x] Integers or int
- [x] Practice python file => [here](./week_0/calculator.py)
- [x] int()
- [x] round()
- [x] Nesting and Nested Functions
- [x] Float Point Values or Decimals
- [x] Round off function
- [x] Better Number Separation/Notation with fstring
- [x] Functions in python
- [x] Scope of variables
- [x] Return Values
- [x] Side Effect
- [x] Global Keyword
- [x] [Problem Set 0](./week_0/problem_set_0/)
- [x] [Indoor Voice](./week_0/problem_set_0/indoor/indoor.py)
- [x] [Playback Speed](./week_0/problem_set_0/playback/playback.py)
- [x] [Making Faces](./week_0/problem_set_0/faces/faces.py)
- [x] [Einstein](./week_0/problem_set_0/einstein/einstein.py)
- [x] [Tip Calculator](./week_0/problem_set_0/tip/tip.py)
## Week 1: Conditionals
checkout the topics covered:
- [x] Conditionals
- [x] if keyword
- [x] Boolean Expressions
- [x] [Practice Question](./week_1/compare.py)
- [x] elif keyword
- [x] else keyword
- [x] or keyword
- [x] and keyword
- [x] Question: Include the inclusive range values using conditionals with assignment operators
- [x] [Inclusive Range](./week_1/grade.py)
- [x] Boolean Values
- [x] True
- [x] False
- [x] match case (switch case in other language, ex: Java)
- [x] | (pipe symbol) or used in match case
- [x] [Use of |](./week_1/house.py)
- [x] not keyword
- [x] [Problem Set 1](./week_1/problem_set_1/)
- [x] [Deep Thought](./week_1/problem_set_1/deep/deep.py)
- [x] [Bank](./week_1/problem_set_1/bank/bank.py)
- [x] [File Extension](./week_1/problem_set_1/extensions/extensions.py)
- [x] [Interpreter](./week_1/problem_set_1/interpreter/interpreter.py)
- [x] [Meal Time](./week_1/problem_set_1/meal/meal.py)
## Week 2: Loops
checkout the topics covered:
- [x] Loops
- [x] While Loop
- [x] continue
- [x] break
- [x] Infinite Loop
- [x] while True
- [x] For loops
- [x] List
- [x] range
- [x] Accessing list items
- [x] length or len
- [x] append
- [x] remove
- [x] extend
- [x] insert
- [x] reverse
- [x] Dictionary
- [x] Key: Value pairs
- [x] Accessing dictionary
- [x] get method
- [x] update method
- [x] pop
- [x] clear
- [x] items
- [x] None keyword
- [x] List and Dictionary Comprehension
- [x] String Methods
- [x] capitalize
- [x] title
- [x] strip
- [x] join
- [x] String Slicing
- [x] Tuples
- [x] List vs Tuple
- [x] Better Memory utilization
- [x] Some other functions/methods
- [x] getsizeof: (also use- import sys module)
- [x] enumerate
- [x] isalpha
- [x] isdigit
- [x] isalnum
- [x] [Problem Set 2](./week_2/problem_set_2/)
- [x] [camelCase](./week_2/problem_set_2/camel/camel.py)
- [x] [Coke Machine](./week_2/problem_set_2/coke/coke.py)
- [x] [Just setting up my twttr](./week_2/problem_set_2/twttr/)
- [x] [Vanity Plates](./week_2/problem_set_2/plates/plates.py)
- [x] [Nutrition Facts](./week_2/problem_set_2/nutrition/nutrition.py)
## Week 3: Exceptions
checkout the topics covered:
- [x] Errors
- [x] Runtime Errors
- [x] SyntaxError
- [x] ValueError
- [x] NameError
- [x] Exception Handling
- [x] try
- [x] except
- [x] else
- [x] Infinite loop with Exception handling
- [x] **_`pass`_** keyword
- [x] Debugging
- [x] Bugs
- [x] Debugger
- [x] Breakpoint
- [x] Raising Exceptions
- [x] **_`raise`_** keyword
- [x] [Problem Set 3](./week_3/problem_set_3/)
- [x] [Fuel Gauge](./week_3/problem_set_3/fuel/fuel.py)
- [x] [Felipe's Taqueria](./week_3/problem_set_3/taqueria/taqueria.py)
- [x] [Grocery List](./week_3/problem_set_3/grocery/grocery.py)
- [x] [Outdated](./week_3/problem_set_3/outdated/outdated.py)
## Week 4: Libraries
checkout the topics covered:
- [x] Libraries
- [x] Modules
- [x] random
- [x] randint(a, b)
- [x] shuffle(x)
- [x] choice(list)
- [x] choices(list, weights, num)
- [x] sampling with replacement
- [x] sample(list, num)
- [x] seed
- [x] statistics
- [x] mean(x)
- [x] sys
- [x] argv[indx]
- [x] exit(msg)
- [x] requests
- [x] get(url, params)
- [x] json
- [x] dumps(json_value, index)
- [x] **_`import`_** keyword
- [x] **_`from`_** keyword
- [x] Command-line arguments
- [x] String Method: `slices`
- [x] Packages
- [x] PyPi: Python Package Index
- [x] pip
- [x] API
- [x] Endpoints
- [x] JSON
- [x] Using Exception Handling with API
- [x] API Parameters
- [x] Using main function
- [x] __name__
- [x] __main__
- [x] Package
- [x] Dunder files
- [x] Dunder __init__ file
- [x] Style
- [x] PEP: Python Enhancement Proposal
- [x] PEP8
- [x] linter
- [x] pylint
- [x] pycodestyle
- [x] black
- [x] [Problem Set 4](./week_4/problem_set_4/)
- [x] [Emojize](./week_4/problem_set_4/emojize/emojize.py)
- [x] [Frank, Ian and Glen's Letters](./week_4/problem_set_4/figlet/figlet.py)
- [x] [Adieu, Adieu](./week_4/problem_set_4/adieu/adieu.py)
- [x] [Guessing Game](./week_4/problem_set_4/game/game.py)
- [x] [Little Professor](./week_4/problem_set_4/professor/professor.py)
- [x] [Bitcoin Price Index](./week_4/problem_set_4/bitcoin/bitcoin.py)
## Week 5: Unit Tests
checkout the topics covered:
- [x] Testing a function
- [x] assert
- [x] Exception handling with assert
- [x] AssertionError
- [x] Pytest
- [x] raises(ErrorName)
- [x] isinstance(object, classinfo)
- [x] approx(num, diff_num)
- [x] Unit Testing
- [x] Package
- [x] **_`with`_** keyword
- [x] [Problem Set 5](./week_5/problem_set_5/)
- [x] [testing my twttr](./week_5/problem_set_5/twttr/test_twttr.py)
- [x] [Back to the Bank](./week_5/problem_set_5/test_bank/test_bank.py)
- [x] [Re-requesting a Vanity Plate](./week_5/problem_set_5/test_plates/test_plates.py)
- [x] [Refueling](./week_5/problem_set_5/test_fuel/test_fuel.py)
## Week 6: File I/O
checkout the topics covered:
- [x] open function
- [x] requirements for open
- [x] open(fileName, fileHandle)
- [x] `"w"`: write file handle
- [x] **__`write`__** method
- [x] write(value)
- [x] **__`close`__** method
- [x] file.close()
- [x] `"a"`: append file handle
- [x] `"r"`: read file handle: default for oepning a file
- [x] readlines function
- [x] with keyword
- [x] `as` keyword
- [x] sorted(iterable, sortingMethod, doReverse)
- [x] CSV: Comma Separated Values
- [x] csv module
- [x] reader function
- [x] DictReader
- [x] writer
- [x] DictWriter
- [x] witerow
- [x] Dictionary Shorthand
- [x] Lambda Function or Anonymous Function
- syntax: lamda param: returnValue
- [x] Binary File
- [x] Pillow or PIL
- [x] Image class
- [x] size
- [x] format
- [x] rotate
- [x] save
- [x] ImageFilter class
- [x] filer
- [x] Reading and Writing CSV and Other file
- [x] using DictReader
- [x] using DictWriter
- [x] writer and writerheader
- [x] writerrow
- [x] read()
- [x] readlines()
- [x] writelines()
- [x] [Problem Set 6](./week_6/problem_set_6/)
- [x] [Lines of Code](./week_6/problem_set_6/lines/)
- [x] [Pizza Py](./week_6/problem_set_6/pizza/pizza.py)
- [x] [Scourgify](./week_6/problem_set_6/scourgify/scourgify.py)
- [x] [CS50 P-Shirt](./week_6/problem_set_6/shirt/shirt.py)
## Week 7: Regular Expressions
checkout the topics covered:
- [x] Regular Expressions or Regex
- [x] re library
- [x] re.search
- patterns
- strings
- flags
- IGNORECASE
- MULTILINE
- DOTALL
- [x] re.match
- group
- groups
- [x] re.sub
- [x] re.fullmatch
- [x] re.split
- [x] re.findall
- [x] Some special symbols in regex
- [x] **`.`** dot - char
- [x] **`*`** asterisk - 0 or more character
- [x] **`+`** plus - 1 or more character
- [x] **`?`** question mark - 0 or 1 character
- [x] **`{m}`** repetitions of character
- [x] **`{m, n}`** range of repetitions of character
- [x] **`^`** caret - start of string
- [x] **`$`** dollar - end of string
- [x] **`[]`** set of characters
- [x] **`[^]`** complement of the set of characters
- [x] **`[x-y]`** range of characters using `-` dash
- [x] **`A | B`** either A or B with pipe symbol `|`
- [x] **`(...)`** group characters and capture
- [x] **`(?...)`** don't capture the group
- [x] Non-deterministic Finite Automaton
- [x] keep track of pattern match
- [x] first state (single circle)
- [x] curve edge
- [x] label
- [x] reflexive edge
- [x] accept state (double circle)
- [x] raw string
- `r""`
- [x] special characters
- `\`
- [x] list of patterns
- [x] **`\d`** decimal digits (numbers 0-9)
- [x] **`\D`** not decimal digit
- [x] **`\s`** whitespace character
- [x] **`\S`** not a whitespace character
- [x] **`\w`** word characters(a-zA-Z), numbers(0-9) and underscore `_`
- [x] **`\W`** not a word characters
- [x] **`\b`** boundary of a character
- [x] group
- [x] Wallrus Operator (:=)
- [x] replace()
- [x] removeprefix()
- [x] [Problem Set 7](./week_7/problem_set_7/)
- [x] [NUMB3RS](./week_7/problem_set_7/numb3rs/)
- [x] [Watch on YouTube](./week_7/problem_set_7/watch/watch.py)
- [x] [Working 9 to 5](./week_7/problem_set_7/working/)
- [x] [Regular, um, Expressions](./week_7/problem_set_7/um/)
- [x] [Response Validation](./week_7/problem_set_7/response/response.py)
## Week 8: Object-Oriented Programming
checkout the topics covered: