subject

For this program you will build a simple dice game called Pig. In this version of Pig, two players alternate turns. Players each begin the game with a score of 0. During a turn a player will roll a six-sided die one or more times, summing up the resulting rolls. At the end of the player's turn the sum for that turn is added to the player's total game score If at any time a player rolls a 1, the player's turn immediately ends and he/she earns O points for that turn (i. e. nothing is added to the player's total game score). This is called "pig". After every roll that isn't a 1, the player may choose to either end the turn, adding the sum from the current turn to his/her total game score, or roll again in an attempt to increase the sum. The first player to 50 points wins the game Details
Open a text editor and create a new file called pig. py. In the file
Write a function called print_scores that has four parameters - these hold, in this order, the name of the first player (a string), his/her score (an int), the second player's name (a string), and score (an int).
The function will
Print the following message, using the current parameter values for the player names and scores (NOT necessarily Ziggy, 18, Elmer, and 23) -SCORES Ziggy:18 Elmer 23--
Print an empty line before this line
There is a single tab between SCORES and the name of player 1 .
There is a single tab between player 1's score and player 2's name .
Every other gap is a single space

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
When working with a team you should always do the following, except? question 3 options: be dependable and trustworthy be sensitive to others feelings do your fair share critique members of the group
Answers: 2
question
Computers and Technology, 22.06.2019 14:30
The “rule of 72” is used to approximate the time required for prices to double due to inflation. if the inflation rate is r%, then the rule of 72 estimates that prices will double in 72/r years. for instance, at an inflation rate of 6%, prices double in about 72/6 or 12 years. write a program to test the accuracy of this rule. for each interest rate from 1% to 20%, the program should display the rounded value of 72/r and the actual number of years required for prices to double at an r% inflation rate. (assume prices increase at the end of each year.)
Answers: 1
question
Computers and Technology, 22.06.2019 17:40
Gabe wants to move text from one document to another document. he should copy the text, paste the text, and open the new document highlight the text, select the cut command, move to the new document, make sure the cursor is in the correct location, and select the paste command select the save as command, navigate to the new document, and click save highlight the text, open the new document, and press ctrl and v
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
What is the most popular genre of video games?
Answers: 1
You know the right answer?
For this program you will build a simple dice game called Pig. In this version of Pig, two players a...
Questions
question
English, 23.07.2021 18:10
question
Mathematics, 23.07.2021 18:20
question
Mathematics, 23.07.2021 18:20
question
Physics, 23.07.2021 18:20
question
Mathematics, 23.07.2021 18:20
question
Mathematics, 23.07.2021 18:20
Questions on the website: 13722360