Cs50 Mario, I have posted the code itself below.