please help on code so that the scores can be saved and stored please include extras if needed to
@Saoxddd, your only real error here is that you have
int(score) when writing to the file, and it should be
score is already of type
int but has to become a
string to be written to the file this way. Also, repl doesn't like writing to files on here, but if you run the program with
python3 in 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!
Good luck, @Saoxddd!
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.