solution and encrypt code for first programming assignment.