Help with Creating a Code

Homework for you to master: