Users_points = points'.format(bp, users_points)) # This prints all players scores While ens not in ('e', 'n', 's'): # if anything else but these characters are entered it will loop until it is correct Print("Please enter 'n' if you are a new user and 'e' if you are a exsiting user and enter 's' to display scores") I just want suggestions on how I could improve this updated code. Some updates that I have done to this code include adding functions to it so that it reduces the size of the code, removing repeated code, acting upon the suggestions that were given to me on my old code, and trying to improve my DRY (don't repeat yourself) skills. If there is a draw after five rounds then both users will have to roll one die to determine the winner. If the total of dice is even the player gains 10 points if it is odd, they lose 5. This is a game for two users who roll 2 dice 5 times.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |