Programming challenge - dice game

Assignment Help Python Programming
Reference no: EM133098730

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: EM133098730

Questions Cloud

Embracing diversity as a competitive advantage : Maxtor Corporation (MC) of Ohio has been producing small electronic toys in Singapore. The factory has been operated by local managers, but MC now wants to expa
What was the reason for the fixed exchange rates : the General Agreement on Tariff and Trade was established and reduced international trade tariffs. What was the reason for the fixed exchange rates
Discuss how the roles performed by hr have changed : Discuss how the roles performed by HR have changed over the years?
Wheels and more sales and alignment services : Wheels and More Sales Alignment Services is the leading tyre and wheel alignment company in Jamaica; headquartered at 20 Slipe Road, Kingston 5 with two additio
Programming challenge - dice game : Allows two players to enter their details, which are then authenticated to ensure that they are authorised players - Outputs who has won at the end
Importance of creating an organizational culture : a. Analyze the importance of creating an organizational culture that meets the needs of the total person.
What is the return on shareholders equity : Pony Express Company has $750,000 in assets and $300,000 of debt The income for the year is $55,000. What is the return on shareholders equity
Effective communication between the instructor and students : During the next week, study the listening habits of students in another class in which you are enrolled. Keep a journal of your observations by identifying the
Protecting the safety and health of employees : What does the McWane saga tell us about the limitations of each of the following as means of protecting the safety and health of employees?

Reviews

Write a Review

Python Programming Questions & Answers

  Create a class named animal thatis used to store information

InfoTc 1040 Introduction to Problem Solving and Programming Animal Class -Create a class named Animal thatis used to store information about an animal.

  How a vertical scroll bar is associated with a list box

What are instance variables, and what role does the name ‘self' play in the context of a class definition. Describe how a vertical scroll bar is associated with a list box.

  Implement solution algorithm using basic programming

Develop self-reliance and judgement in adapting algorithms to diverse contexts - Design and write program solutions to identified problems using accepted

  What other factors might be at work

Some well-educated young adults day they are dissatisfied with their denomination's conservative stance on homosexuality. What other factors might be at work?

  Which stores should each warehouse supply

Which stores should each warehouse supply? How many vans or lorries should they use? What routes should each vehicle take? What is the total cost?

  Create a member object which can accept the players name

Create a member object which can accept the player's name, phone number, and jersey number. Replace the list with a dictionary to help in locating objects.

  Read an eight digit decimal integer from the keyboard

Write a complete Python program that Read an eight digit decimal integer from the keyboard with proper prompt. The prompt should remind the user that integer.

  Write a program to receive a series of numbers

Write a program to receive a series of numbers (including decimal) from the user until enter key is pressed. Process the input data and display number count, sum and average. Use proper data type and format.

  Create dictionary with a grocery list

Create dictionary with a grocery list. Assign the dictionary to the variable grocery_list. Create dictionary with a grocery list. Assign the dictionary.

  Code a console-based program in python

CP1404/CP5632 2016 SP2/22/52 Shopping List 1.0 - You are to plan and then code a console-based program in Python 3, as described in the following information and sample output. This assignment will help you build skills using selection, repetition,..

  Display all of the scores entered and the total score

Ask the user in between each score if they want to continue (y/n). Display all of the scores entered and the total score at the end.

  Implement view classes for the game map

Implement view classes for the game map and the inventory. However, because these widgets can both be represented by grids of rectangles

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