Calculates and outputs the points for each round

Assignment Help Python Programming
Reference no: EM133098462

Programming challenge: Dice game

Brief

Katarina is developing a two-player dice game.

The players roll two 6-sided dice each and get points depending on what they roll.

There are 5 rounds in a game.

In each round, each player rolls the two dice. The rules are:

• The points 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 authorised players can 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 authorised players.

2. Allows each player to roll two 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 file.

Reference no: EM133098462

Questions Cloud

What is the arbitrage profit per share : What is the arbitrage profit per share if there is an arbitrage opportunity in today's dollar (PV of the profit) ignoring the transaction fee
Design Assessment Modelling Report : Design Assessment - To improve its services, the senior management of the library has considered a computerized library management system
What is the monthly payment to the dealer : You are considering buying a new guitar worth $10,000. The dealer offers you a financing package. What is the monthly payment to the dealer
Comparing ratio to industry average important : How does this company's ratio compare to those of its competitors? Why is comparing this ratio to the industry average important?
Calculates and outputs the points for each round : Design, develop, test and evaluate a program and Calculates and outputs the points for each round and each player's total score
Policy change while using approval processes : Explain how you would advocate for your policy change while using the approval processes in your organization.
What depreciation would be charged in the first year : Blan Ltd has recently acquired machine that cost $29,000. What depreciation would charged in first year of the machine's operation when 1000 units were produced
Practices earned value management : Address the personnel establishment that practices earned value management (EVM).
What is the ytm of the bond : The bond pays interest annually. Yesterday this bond traded for $102 per $100 of par value. What is the YTM of the bond

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program that prompts for an integer

Write a Python program that prompts for an integer-let's call it X-and then ands the sum of X consecutive integers starting at 1.

  Write a program that reads a file containing two columns

Write a program that reads a file containing two columns of integers. Print the sum of each column. Use a loop to read the data from the file.

  Create an algorithm-pseudocode called stadiumalgorithm

Create an algorithm (pseudocode) called stadiumAlgorithm.txt. Code the program as stadium.py. Upload your pseudocode and your source code (stadium.py).

  How to make a class that reads the students names and scores

How to make a class that reads the students names and scores in a text file and then calculate the average and median scores based on all of the students?

  Creates a mortgage object using the entered values

Creates a Mortgage object using the entered values and Identify and use the correct syntax of a common programming language

  Write a python script that determines the highest day temp

Write a Python script that determines the highest day temp and highest night temp of the following variables. Use conditional statements to print out.

  Create your own example of a function that modifies a list

Create your own example of a function that modifies a list passed in as an argument. Describe what your function does in terms of arguments, parameters.

  Generate a table with the results as shown in the example

Prompt for the difficulty level, and then start the game. The computer picks a random number in that range and prompts the player to guess that number.

  Write a python program that outputs all the even numbers

Write a Python program that outputs all the even numbers from 2 to a number (inclusive) provided by the user, separated by comma

  Prompt the user for the names of two text files

Write a script named copyfile.py. this script should prompt the user for the names of two text files. the contents of the first file.

  Calculate and print bills for the city power company

Write program that will calculate and print bills for the city power company. The rates vary depending on whether the use is residential, commercial

  Write the boolean expression that will state grater number

If x and y are both numbers: write the Boolean expression that will state that (x - 2y) is greater than 0 and less than 12. write the Boolean expression.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd