Summary:
The point of this program was to use the dice rolling program to write to a text file in order to be analyzed later. I did this by opening the file, setting 3 variables to the variables from the Dice Roll program to save some time later on, and asking how many times the player wants to roll. Then, while the amount of rolls done, is less than the amount of rolls wanted it rolls the dice, then it writes that to a file with f.write command and then a blank line after. All this is repeated again until the amount of requested rolls has been achieved.
Issues:
It was difficult to find the command to write information to a file as it had not been covered in our codeacademy lessons. Also figuring out how to make the printed information go into another line was difficult, but we figured out that it was \n.
Profit:
This is important so that we can learn how to save games in the future. But also to get a more complete knowledge of python.

No comments:
Post a Comment