Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For my programming assignment. I need to write a Python 3 named matchsticks which plays a matchstick-picking game: Matchsticks 15; Players 2; Would start a

For my programming assignment. I need to write a Python 3 named matchsticks which plays a matchstick-picking game:
Matchsticks 15; Players 2;
Would start a game with 15 sticks.Players take turns picking 1,2 or 3 sticks from a pile. Until all matchsticks are taken whoever has an even number of matchsticks wins
If no number is given, then ask the user to enter one. The program takes the first pick.Once even matchsticks, the program announces who won.
The most important step is ( final step):
Solver can change game in 1 line or code!!!
Like:1,2,...10 game( shows below in a picture)
image text in transcribed
Strong Solving Example: 1,2,...,10 Rules (on your turn): o Running total Rules (on your turn): Add 1 or 2 to running total Goal o Be the FIRST to get to 10 - Example a Ana: "2 to make it 2" a Bob: "1 to make it 3" a Ana: "2 to make it 5 a Bob: "2 to make it 7" photo a Ana: "1 to make it 8" o Bob: "2 to make it 10" I WIN 7 ducks (out of 10) Strong Solving Example: 1,2,...,10 Rules (on your turn): o Running total Rules (on your turn): Add 1 or 2 to running total Goal o Be the FIRST to get to 10 - Example a Ana: "2 to make it 2" a Bob: "1 to make it 3" a Ana: "2 to make it 5 a Bob: "2 to make it 7" photo a Ana: "1 to make it 8" o Bob: "2 to make it 10" I WIN 7 ducks (out of 10)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

More Books

Students also viewed these Databases questions