Yiyang's Chapter 5 Exercise

by Yiyang Shi

03 Feb 2016

Here is exercise 1:

Here is exercise 2:

Reflection:

  1. I notice that it is easier to write the loop first and then initialize the variables used in the loop. Although one needs to double check if all the variables are initialized.

  2. Having to int(input) every time is a little annoying. Creating a new variable that equals the numerical value of the input with int data type may ease the process.

Find Yiyang Shi on Twitter, Github, and on the web.