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 18:10
Assume that to_the_power_of is a function that expects two int parameters and returns the value of the first parameter raised to the power of the second parameter. write a statement that calls to_the_power_of to compute the value of cube_side raised to the power of 3 and that associates this value with cube_volume.
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Font size, font style, and are all aspects of character formatting.
Answers: 2
question
Computers and Technology, 24.06.2019 03:30
Explain the importance of html in web page designing in 20 sentences..
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
Consider jasper’s balance sheet. which shows how to calculate jasper’s net worth?
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
Physics, 17.07.2020 08:01
question
French, 17.07.2020 08:01
question
Biology, 17.07.2020 08:01
Questions on the website: 13722362