Question: Everything seems to work on here except in bottom right where I put the # symbol. After the game is finished the 0 should end
Everything seems to work on here except in bottom right where I put the # symbol. After the game is finished the 0 should end the program and give the message "Thanks for playing! See you again soon!" but instead it asks for the player to select a pile again. Also on line 97 I have a line of code which should solve my problem where it says the computer removed a stone from pile 2 but it actually removed it from pile 1.


15 start_str input("Would you like to play? (0 no, 1-yes) " 16 start int- int(start str) 17 if start int:-0: 18 print"Thanks for playing! See you again soon!") 19 pile one-int(5) 20 pile two-int(5) 21 score ply-int (8) 22 score-compaint(0) 23 if start_int 1 or start intc9: 24 start strinput( "Would you like to play? ( no, 1yes) ") 25 tart int int(start str) 26 while start_int1: 27 printl"Start-Pile 1: 5 Pile 2: 5") 28 ile pile one-0 and pile twoz 0: 29 Name Type pile int int pileone int pile str str pile two int score_comp int score ply int start int int start str Value exit pile str-input("Choose a pile (1 or 2):) pile intintpile str) if pileint
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
