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 to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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