Skip to content

Lovkush-A/cs50

Repository files navigation

cs50

The work I am doing for the HarvardX course CS50 Introduction to Computer Science, https://cs50.harvard.edu/x/2020/. Note that in several of the exercises, the 'skeleton' of the code was already written and we only had to write the sub-functions.

Problem Set 0: Scratch

Task is to create something/anything in Scratch. I created a game where you control a dragon and kill dinosaurs that appear. Due to time limitations, I did not create a way to die and there is no end to the game.

Problem Set 1: Intro to C

The first forray into C. Loops, conditionals, functions, printf, getting input from a user. Task 1a was to print "Hello, ", Task 1b was to print a pyramid of # symbols, and Task 1c was to write a program which takes as input a (supposed) credit card number and determines which company issued the card.

Problem Set 2: Strings

Task 2a was to determine the Coleman-Liau index for an inputted piece of text. Task 2b was to encrypt some text using a substitution cipher.

Problem Set 3: Sorting

Task 3a and 3b were about implementing voting systems. In Task 3a we had to implement a plurality system (whoever has the most votes wins) and in Task 3b we had to implement the more sophisticated Tideman voting system. This was surprisingly tough compared to the previous exercises, because we had to design an algorithm which determined if the addition of a new edge into a graph would create a cycle. I would be impressed if somebody without a mathematical background was able to do this!

Problem Set 4: Memory and pointers

Memory and pointers. Task 4a was interesting as we created filters for images: greyscale, reflection, blur and edge-detection. Task 4b was about extracting jpeg data from data extracted from a memory card. Task 4b was frustrating, because I could get things to work using fgetc but not using fread. In the end, the issue was I was using a char buffer instead of an unsigned char buffer.

Problem Set 5: Data structures

In Task 5, we had to create a spell-checker using hash-tables. Up till now I have been debugging using printf, but this exercise revealed to me the utility of a proper debugging tool. It is satisfying to see hash tables get filled in one-by-one!

Problem Set 6: Introduction to Python

Tasks 6a-d were reimplementing tasks from Problem Set 1 and Problem Set 2a in python. Task 6e was about implementing a DNA test: given a dna sequence and a database of 'dna fingerprints', find a match if there is one. This week was much easier than the previous three Problem Set.

Problem Set 7: SQL

7a was all about getting used to SQL commands. 7b was about using python to update a database and then run SQL commands on that database and printint some output.

About

The work I am doing for the HarvardX course CS50 Introduction to Computer Science

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published