An archive of completed CS50 Problem Sets. Written in C, Python, SQL & others.
https://cs50.harvard.edu/x/2020/
- P0: Scratch
- P1-P5: C
- P6: Python
- P7: Python & SQL
- hello.c - An obligatory "hello, world" program.
- mario.c - Prints a 2D pyramid in the terminal window (as seen in Nintendo’s Super Mario Brothers). Uses do-while & for loops.
- mario_alt.c - Alternative implementation of mario.c using recursion.
- credit.c - Checks credit card numbers for card type and validity. Uses arrays, for loops, arithmetic.
- readability.c - Computes the approximate grade level needed to comprehend text. Uses for loops, ctype.h & string.h library functions.
- substitution.c - Implementation of a substitution cipher to encrypt plaintext. Uses for loops, ctype.h & string.h library functions.
- hello.py - P1's hello.c in Python.
- mario.py - P1's mario.c in Python. Uses while loops.
- credit.py - P1's credit.c in Python. Uses lists, while loops, arithmetic.
- readability.py - P2's readability.c in Python.
- dna.py - Checks against a database for matching DNA sequences by analyzing Short Tandem Repeats. Uses while loops, csv library functions.
- 1-13.sql - Operations & functions used: SELECT, JOIN, WHERE, IN, LIKE, ORDER BY, LIMIT, COUNT, %, AVG, DISTINCT.
- import.py - Transforms & imports student data from csv to sql db. Uses sqlite3, csv & sys library functions.
- roster.py - Generates class rosters from sql db. Uses sqlite3, csv & sys library functions.