Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I NEED HELP!!!
#1
I'm a year 11 student doing one of those stupid OCR Programming tasks. It's my first year with programming so I'm not the best and therefore I need help. The task is:

The players roll two 6-sided dice and get points depending on what they roll. There are 5 rounds in a game. In each game, each player rolls the two dice.
The rules are:
• The point rolled on each player’s dice are added to their score.
• If the total is an even number, an additional 10 points are added to their score.
• If the total is an odd number, 5 points are subtracted from their score.
• If they roll a double, they get to roll one extra die and get the number of points rolled added to their score.
• The score of a player cannot go below 0 at any point.
• The person with the highest score at the end of the 5 rounds wins.
• If both players have the same score at the end of the 5 rounds, they each roll 1 die and whoever gets the highest score wins (this repeats until someone wins).
Only authorized players are allowed to play the game.
Where appropriate, input from the user should be validated.

Design, develop, test and evaluate a program that:

1. Allows two players to enter their details, which are then authenticated to ensure that they are authorized players.
2. Allows each player to roll a 6-sided dice.
3. Calculates and outputs the points for each round and each player’s total score.
4. Allows the players to play 5 rounds.
5. If both players have the same score after 5 rounds, allows each player to roll 1 die each until someone wins.
6. Outputs who has won at the end of the 5 rounds.
7. Stores the winner’s score, and their name, in an external file.
8. Displays the score and player name of the top 5 winning scores from the external life.

I can't figure out how to add and subtract from their scores according to whether they land and even or an odd number.
PLEASE PLEASE SEND ME AN ANSWER TO THIS OR OFFER SOME HELP! THE DEADLINE IS MONDAY!!!
Reply


Messages In This Thread
I NEED HELP!!! - by polloila - Mar-29-2019, 11:53 AM
RE: I NEED HELP!!! - by Yoriz - Mar-29-2019, 02:24 PM
RE: I NEED HELP!!! - by perfringo - Mar-29-2019, 02:51 PM
RE: I NEED HELP!!! - by polloila - Apr-01-2019, 07:50 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020