dice game help
please help on code so that the scores can be saved and stored please include extras if needed to
int(score)when writing to the file, and it should be
scoreis already of type
intbut has to become a
stringto be written to the file this way. Also, repl doesn't like writing to files on here, but if you run the program with
python3in the command line, you will find that it works great after making that change.
Also, consider making your code more DRY which is a programming principle that stands for Don't Repeat Yourself. You'll learn this as you go along, but if you find that you're putting code that is very similar down, you can often times make it into a function and save yourself tons of time!
If this answer helped you solve your problem, please consider upvoting and marking as the correct answer. I will still answer questions you may have.