# CS50x Runoff

## From problem set 3

Runoff is a ranked choice voting system. It has the benefit to provide a winner that better reflect the voters’ preference. To make that work, each voter rank the candidates in a preference list. If any candidate has a majority of the first vote preference, that candidate is declared the…

# CS50x Plurality

## From problem set 3

Plurality is a fairly simple introduction exercise to the next on the problem set, either you choose the less comfortable route with Runoff or the more comfortable with Tideman.

In Plurality we need to organize a simple election. The main function and headers are given by the course as a…

# CS50x Substitution

## From problem set 2

This time we’re preparing to code a substitution cipher. Instead of getting a number for key, we’ll be getting a string. A 26 character long string to be more exact, where each character will replace it’s equivalent index on the alphabet.

“A key, for example, might be the string `NQXPOMAFTRHLZGECYJIUWSKDVB`

# CS50x Caesar

## From problem set 2

Although it may be obfuscated by the salad, the real Caesar did have his fair share of inventions. One of them, supposedly, is a simple cryptography system that consists in adding a number, or “key” to a letter, transforming it on another letter. A jump of positions based on said…

## From problem set 2

Readability applies The Coleman-Liau index formula to a text. The Coleman-Liau index of a text is designed to output what (U.S.) grade level is needed to understand the text. The formula keeps track of letters, words and sentences to return that index.

`index = 0.0588 * L - 0.296 …`

# CS50x Credit

## From problem set 1

Credit is the point where things start to get complicated. We need to work with a lot of big numbers and not only do mathematics with then but learn how to travel trough the number to access specific digits in its composition. …

# CS50x Mario

## From problem set 1. Both less and more versions.

On Mario problem set we need to create a terminal version of the famous pyramids from Super Mario World. The catch is that the pyramid must be responsive to the user inputs. He is deciding it’s height.

# CS50x Cash

## From problem set 1

Cash is the easier project we work on the entire course (provided you’re using the CS50 library). It basically asks us to count how many coins we need to use to return a change. …

## Guilherme Pirani

Get the Medium app