Generate a random number

Assignment Help Business Management
Reference no: EM132170363

Python For Loops - Version 3

User will roll 5 dice with the goal of getting 5 of a kind within 4 rolls. The resulting number on each die will be generated randomly.  User can use the "random" module to cbetween 1 and 6. You can read about the random module in the Python documentation.The way you will use it is something like random.randint(a, b). 

The user will decide which of the values they want to keep out of the current roll. For instance if the current roll is (2, 3, 2, 1, 6), the user may specify that they wish to keep the 2's. In this case, in the dice that do not contain the value 2 will be rolled again.   If the player does not have 5 of a kind after 4 rolls, inform them that they have lost the game and ask if they would like to play again. If they have 5 of a kind, inform them that they have won the game.  Remember, the user may change their mind as to which values to keep so it shouldn't be assumed that they are trying for the same value for all 4 rolls. At each roll, your program should show the current value of each die. For instance, the program might look like this:

Hi, welcome to Yat!  

Your first roll is:  5, 6, 1, 5, 5

Which value you would like to keep? 

5

Your second roll is: 5, 5, 6, 5, 5

Which value would you like to keep?

5

Your third roll is: 5, 5, 5, 5, 5

You WIN!

Would you like to play again? Please enter Y (yes) or N (no) etc...

Reference no: EM132170363

Questions Cloud

Design a campaign sign : Design a campaign sign. Which state or local newspaper, official, celebrity endorsements will you seek? Why?
What is the warburg effect : Cancer cells have a different mode of metabolism than normal cells. What is the Warburg effect and how much energy does it generate compared to normal aerobic.
How historical thought and tradition affect civil liberties : The Digital Age is having a profound effect on the privacy of individuals in both their daily and private lives.
Find someone whose health has been impacted : For each of the determinants of health that you have learned: 1) Policy, 2) Health Services, 3) Behavioral Choices, 4) Social Determinants, and 5) Biology.
Generate a random number : User will roll 5 dice with the goal of getting 5 of a kind within 4 rolls. The resulting number on each die will be generated randomly.
What you began to complete the project : In Week 5 you submitted your project topic submission as a short presentation. In Week 7, you will pick up on what you began to complete the project.
Effectively implement a policy framework : In order to effectively implement a policy framework, what three organizational elements are absolutely needed to ensure successful implementation?
Describe a methodology for examining internet : Describe a methodology for examining Internet use history on a Windows PC. This should be a step-by-step description of a process.
Discuss how the web portal features and elements : Discuss how the web portal features and elements will help you to advance your e-business.

Reviews

Write a Review

Business Management Questions & Answers

  Caselet on michael porter’s value chain management

The assignment in management is a two part assignment dealing 1.Theory of function of management. 2. Operations and Controlling.

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. Due to increase in the preference for light beer drinkers, Chris Prangel wants to introduce light beer version in Mountain Man. An analysis into the la..

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. An analysis into the launch of Mountain Man Light over the present Mountain Man Lager.

  Analysis of the case using the doing ethics technique

Analysis of the case using the Doing Ethics Technique (DET). Analysis of the ethical issue(s) from the perspective of an ICT professional, using the ACS Code of  Conduct and properly relating clauses from the ACS Code of Conduct to the ethical issue.

  Affiliations and partnerships

Affiliations and partnerships are frequently used to reach a larger local audience? Which options stand to avail for the Hotel manager and what problems do these pose.

  Innovation-friendly regulations

What influence (if any) can organizations exercise to encourage ‘innovation-friendly' regulations?

  Effect of regional and corporate cultural issues

Present your findings as a group powerpoint with an audio file. In addition individually write up your own conclusions as to the effects of regional cultural issues on the corporate organisational culture of this multinational company as it conducts ..

  Structure of business plan

This assignment shows a structure of business plan. The task is to write a business plane about a Diet Shop.

  Identify the purposes of different types of organisations

Identify the purposes of different types of organisations.

  Entrepreneur case study for analysis

Entrepreneur Case Study for Analysis. Analyze Robin Wolaner's suitability to be an entrepreneur

  Forecasting and business analysis

This problem requires you to apply your cross-sectional analysis skills to a real cross-sectional data set with the goal of answering a specific research question.

  Educational instructional leadership

Prepare a major handout on the key principles of instructional leadership

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