Tuesday, June 5, 2018

GIS Programming Module 3

This week in the lab we focused on error management and creating code from scratch. Below is my output and scripting to reach the goal of the lab.
To remove the numbers from the list that were equal to the “bad” number that was randomly generated I had to set a variable for how many bad numbers there were in the list. I then used a while loop when bad was greater than zero to remove one iteration of the number from the list and decrease the value of bad by one. This continued until bad equaled zero therefore removing all bad numbers from the list.

No comments:

Post a Comment