Trying to fix this program

I couldn't do it because I haven't learned random numbers yet, I am sorry.