Changes During Implementation
Document Type:Coursework
Subject Area:Technology
The implementation of random number using the distance to the hole when it is less than 10 meters was quite challenging as I had to set the maximum and the minimum distances and vary it every time. In addition to this, the concept of shot being restricted to above zero wasa also a challenge. I went about this by using an if statement to make a shot of 1 meter incase the program randomized the distance to 0 meters. The change that I did was to leave out the function to determine random number generator, randNumber. I left out the random number generator function, randNumber previously stated in assignment 1 because the python language has an inbuilt random number generator function that I implemented directly in the code.
From $10 to earn access
Only on Studyloop
Original template
Downloadable
Similar Documents