Question
Hi I need some more help with Python coding here is my code print (welcome to Pick Up Sticks ) print (Each player takes turn
Hi I need some more help with Python coding here is my code
print ("welcome to Pick Up Sticks ") print ("Each player takes turn picking up from 1") print ("to 4 sticks from a pile of 13 sticks.") print ("whoever picks up the last stick wins.") print ("There are 13 stick(s) left.") print("how many sticks will you take?") print ("Player 1 ") totalSticks = 13 maxSticks= 4 minSticks = 1 #Loop until totalSticks > 0 while totalSticks > 0: sticksSelected= int (input()) #if stick is not in the given range ask user again while sticksSelected it is not working right the introduction works okay however the game isn't working it supposed to start with player 1 how many sticks will you select player 1 types in 4 and then it said there are 9 sticks left then it goes to player 2 how many sticks will you take player 2 types in 9 and that won't work and then player 2 type in 6 that won't work either and then player 2 types in 2 That leaves the message of there are 7 sticks left and then player 1 types in 1 leaving 6 and then player 2 types in 3 leaving 3 sticks and then player 1 types in 3 making player 1 the winner .
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started