Computers and Technology

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

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:00, michael3592
When is an original work considered public domain? a. when posted via social media b. when it is posted on the internet c. when a copyright symbol is not included with the piece of work d. when explicit permission is given by the author / owner
Answers: 1
image
Computers and Technology, 22.06.2019 16:30, jngonzo1226
Which of the following statements best describes it careers?
Answers: 2
image
Computers and Technology, 22.06.2019 22:10, Metlife
Asequential circuit contains a register of four flip-flops. initially a binary number n (0000 ≤ n ≤ 1100) is stored in the flip-flops. after a single clock pulse is applied to the circuit, the register should contain n + 0011. in other words, the function of the sequential circuit is to add 3 to the contents of a 4-bit register. design and implement this circuit using j-k flip-flops.
Answers: 1
image
Computers and Technology, 23.06.2019 03:30, bellsbella34
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
Do you know the correct answer?
For this program you will build a simple dice game called Pig. In this version of Pig, two players a...

Questions in other subjects: