GIS 4102 lab 2
This was a fun lab, coding is turning out to be a lot of fun to get in to.
Here we had four small challenges:
1: Create a small list of our full names and print our last name using indexing.
2: Debug code for a dice game, where a player's name length is calculated, and a die roll is generated for 2x the length. We used a for loop to cycle through every player and determine win, lose, or draw.
3-4: create a program from scratch that generated 20 random numbers 1-10, appended them to a list, and stopped after 20. Then, we assigned an "unlucky" number, identified how many times it appeared in one generation, then removed it from the list and re-printed.
I'm finding that I understand the logical thinking required for the tasks, but I still need to look up a lot to get the syntax and appropriate code. But it's reassuring to see that I can learn a lot in the space of one week.




Comments
Post a Comment