Thursday, June 8, 2017

GIS Programming (GIS5103): Module 3

In this week's module, we had to complete a incomplete script to perform a rolling dice game using Python. This module was quite the challenge for me since I am a new to the language of programming and Python. Step 3 and Step 4 for were very difficult to create the code correctly for but with the help with friends and classmates, I was able to complete the assignment. 

Notes:



1.    I began step 3 with creating a blank list (mylist=[]). I made my dice variable equal to 20. I then added the while coding as so (while len(mylist) <= dice:). I appended the list to random.randint(0, 10)
2.  Make sure that colon follow the if, else, while


No comments:

Post a Comment