Question: sed to edit it's afer to sty in Protected View Enable Editing 7 6 Python Shell Eile Edit Shel ] Rebug Eptions Windows Help $

sed to edit it's afer to sty in Protected View
Enable Editing
76 Python Shell
Eile Edit Shel] Rebug Eptions Windows Help
$>> Welcome to P1ck Up Sc1cks.
Each player takes turns p1cking up from 1
to 4 st1cks from a p1le of 13 st1cks.
Whoever Dicks up the last stick wins.
There are 13 stick(s) left.
Player 1
how many sticks w111 you take? 4
There are 9 stick(s) left.
Player 2
how many st1cks w111 you take? 9
You can't take 9 sticks.
How many will you take? 6
You can't take 6 st1cks.
How many w111 you take? 2
There are 7 stick(s) left.
Player 1
how many sticks will you take? 1
There are 6 stlck (s) left.
Player 2
how many st1cks w111 you take? 3
There are 3 stick(s) left.
Player 1
how many sticks will you take? 3
Player 1 wins!
Press the enter key to exit.
Press the enter key to exit. 1
ent_Python_1511(1)- Protected View - Saved to this PC V
lings
Review
View
Help
less you need to editit's safer to stay in Protected View.
Enable Editing
2. The game is "Pick Up Sticks". Below is the pseudo code for the problem. Implement the problem using Python code.
Set maximum number of sticks a player can take to 4
Set minimum number of sticks a player can take to 1
Set total number of sticks to 13
Set current player to player 1
Display game instructions
While there are still sticks in pile
Ask current player how many sticks he or she wants
While current player asks to take more than number of sticks left or more than maximum or less than minimum
Ask current player how many sticks he or she wants
Reduce number of sticks in pile by number of sticks current player asked to take
If no sticks left
Current player wins
Make current player other player
See the figure on the next page for a simulation.
See the figure on the next page for a simulation.
[B], Focus
 sed to edit it's afer to sty in Protected View Enable

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!