Ga Kay's Variable Exercise

by Ga Kay Gao

18 Jan 2016

Exercise 2:

Exercise 3:

Exercise 5:

Reflection: I liked these exercises. Overall, they were fairly simple but I still got tricked up on a few parts of the code. One of my issues was with exercise 3. My variables were saving as strings so I had an error when trying to calculate the gross pay. I had to look through some examples to see how I could change a string variable to an integer. I also had to change the pay back to string because I had an error with the concatenation with a string and an integer. Another issue I had with exercise 3 and 5 were with declaring the variables. At first, I had them as integers but I got an error when trying to input decimals. To fix this, I just changed the variable type to float so I could input decimals. This assignment helped me get a better grasp on writing code for user inputs, setting values to a variable, setting variable types, calculating amounts, and printing out messages which I believe are important foundational concepts to coding.

Ga Kay is currently a sophomore studying Information Science at UNC-Chapel Hill. Find Ga Kay Gao on Twitter, Github, and on the web.