Skip to content

jcllobet/cs50x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CS50x

Submission for CS50x online course by Harvard University. Link to edX

Week 0: Scratch

alt text

My Project: A randomized 4 way soccer made with scratch: https://scratch.mit.edu/projects/170768406/

Week 1: C

hello.c : prints hello, world

~/workspace/pset1/ (master) $ ./hello
hello, world

water.c : a program to convert shower's length (in minutes) to equivalent water bottles

~/workspace/pset1/ (master) $ ./water
minutes: 10
bottles: 120

mario.c : a program that recreates half-pyramid using hashes (#) for blocks.

~/workspace/pset1/ (master) $ ./mario
height: 8
       ##
      ###
     ####
    #####
   ######
  #######
 ########
#########

greedy.c : a program that converts your money to quarters (25¢), dimes (10¢), nickels (5¢), and pennies (1¢). Rule: Use the least number of coins.

~/workspace/pset1/ (master) $ ./greedy
O hai! How much change is owed?
0.41
4 coins

Week 2: Crypto

initials.c: a program that given a person’s name, prints a person’s initials.

~/workspace/pset2/ (master) $ ./initials
Harry James Potter
HJP

caesar.c : a program to caesar cipher a text

~/workspace/pset2/ (master) $ ./caesar 13
Be sure to drink your Ovaltine!
Or fher gb qevax lbhe Binygvar!

vigenere.c : a program to vigenere cipher a text

~/workspace/pset2/ (master) $ ./vigenere bacon
Meet me at the park at eleven am
Negh zf av huf pcfx bt gzrwep oz

Week 3: Game of Fifteen

fifteen.c : a game of fifteen games

~/workspace/pset3/ (master) $ ./fifteen 4

15 14 13 12

11 10  9  8

 7  6  5  4

 3  1  2  _
 
Tile to move:

Week 4: Forensics

whodunit.c : a program that intelligently analyze an image (clue.bmp) and turn it to a better image (verdict.bmp)

~/workspace/pset4/ (master) $ ./whodunit clue.bmp verdict.bmp

Before running whodunit.c

Image of clue

After running whodunit.c

Image of verdict

resize.c : a program that can enlarge an image to n size

~/workspace/pset4/ (master) $ ./resize 4 small.bmp large.bmp

Before and after running resize.c

Image of small Image of large

recover.c : a program that recovers .jpeg images from card.raw

~/workspace/pset4/ (master) $ ./recover

Image of before and after

Week 5 and 6: Spellchecker

~/workspace/pset5/ (master) $ ./speller dictionaries/large endi.txt


MISSPELLED WORDS

nme
veri
persan
yo
bro
USConstitution
http
usconstitution
const
html

WORDS MISSPELLED:     10
WORDS IN DICTIONARY:  143091
WORDS IN TEXT:        722
TIME IN load:         0.10
TIME IN check:        0.00
TIME IN size:         0.00
TIME IN unload:       0.06
TIME IN TOTAL:        0.16

Week 7 and 8: Python

Requirements & Dependencies:

cd ~/workspace/pset6/sentiments/
pip3 install --user -r requirements.txt

Convert some of week 1 & 2 .c programs to .py

~/workspace/pset6/ (master) $ python mario.py
Height: 5
    ##
   ###
  ####
 #####
######
~/workspace/pset6/ (master) $ python greedy.py
O hai! How much change is owed?
0.41
4
~/workspace/pset6/ (master) $ python caesar.py 13
HELLO
URYYB
~/workspace/pset6/ (master) $ python vigenere.py bacon
Meet me at the park at eleven am
Negh zf av huf pcfx bt gzrwep oz

Sentiments

smile.py : a program that categorizes a word as positive or negative

smile.png

tweets.py categorizes a user’s recent 100 tweets as positive or negative (uses Twitter API)

tweets.png

Implement a website that generates a pie chart categorizing a user’s tweets sentiments.png

Usage:

~/workspace/pset6/sentiments/ (master) $ export API_KEY= <insert your API_KEY from Twitter here>
~/workspace/pset6/sentiments/ (master) $ export API_SECRET= <insert your API_SECRET from Twitter here>
~/workspace/pset6/sentiments/ (master) $ export FLASK_APP=application.py
~/workspace/pset6/sentiments/ (master) $ export FLASK_DEBUG=1
~/workspace/pset6/sentiments/ (master) $ flask run

Week 9: Python & SQL

C$50 Finance Implement a website via which users can "buy" and "sell" stocks, a la the below.

login.png

history.png

register.png

Requirements & Dependencies:

cd ~/workspace/pset7/finance/
pip3 install --user -r requirements.txt

Usage:

~/workspace/pset7/finance/ (master) $ flask run
~/workspace/pset7/finance/ (master) $ phpliteadmin finance.db

Week 10 & 11: Javascript

Implement a website that lets users search for articles atop a map (using Google's API)

mashup.png

Requirements & Dependencies:

cd ~/workspace/pse8/mashup/
pip3 install --user -r requirements.txt

Usage:

~/workspace/pset8/mashup/ (master) $ export API_KEY=<API_KEY from Google Maps API>
~/workspace/pset8/mashup/ (master) $ flask run
~/workspace/pset8/mashup/ (master) $ phpliteadmin mashup.db

Week 12-end: Final Project

In progress

About

All the exercises from cs50x

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published