Answered step by step
Verified Expert Solution
Question
1 Approved Answer
e can be reused to make things simpler. Where sensible , copy and paste the text from above so that it matches! ( Ware the
e can be reused to make things simpler.
Where sensible copy and paste the text from above so that it matches! Ware the spacing though that's always one that can trip you up
You are guaranteed that the computer player has exactly unique, valid cards so if you're double counting or similar, that means there's a mistake in your code
A full trace of a game
This is just a playthrough of a game, it has examples of most hopefully all if I did it right of the outcomes possible.
Welcome to Sleuth!
Would you like to:
Ask a question.
Guess a card.
Which option would you like?
Which question would you like to ask?
How many cards with a certain colour?
How many cards with a certain shape?
How many cards with a certain number?
How many cards with a certain colour and number?
How many cards with a certain shape and number?
How many cards with a certain colour and shape?
Which option would you like?
The colour options are:
RED
BLUE
GREEN
YELLOW
Which colour do you want?
The player has cards with colour RED.
Would you like to:
Ask a question.
Guess a card.
Which option would you like?
Which question would you like to ask?
How many cards with a certain colour?
How many cards with a certain shape?
How many cards with a certain number?
How many cards with a certain colour and number?
How many cards with a certain shape and number?
How many cards with a certain colour and shape?
Which option would you like?
The shape options are:
HEXAGON
CIRCLE
DIAMOND
RHOMBUS
Which shape do you want?
The player has cards with shape HEXAGON.
Would you like to:
Ask a question.
Guess a card.
Which option would you like?
Which question would you like to ask?
How many cards with a certain colour?
How many cards with a certain shape?
How many cards with a certain number?
How many cards with a certain colour and number?
How many cards with a certain shape and number?
How many cards with a certain colour and shape?
Which option would you like?
Enter a number from inclusive:
The player has cards with number
Would you like to:
Ask a question.
Guess a card.
Which option would you like?
Which question would you like to ask?
How many cards with a certain colour?
How many cards with a certain shape?
How many cards with a certain number?
How many cards with a certain colour and number?
How many cards with a certain shape and number?
How many cards with a certain colour and shape?
Which option would you like?
The colour options are:
RED
BLUE
GREEN
YELLOW
Which colour do you want?
Enter a number from inclusive:
The player has cards with colour BLUE and number
Would you like to:
Ask a question.
Guess a card.
Which option would you like?
Which question would you like to ask?
How many cards with a certain colour?
How many cards with a certain shape?
How many cards with a certain number?
How many cards with a certain colour and number?
How many cards with a certain shape and number?
How many cards with a certain colour and shape?
Which option would you like?
The shape options are:
HEXAGON
CIRCLE
DIAMOND
RHOMBUS
Which shape do you want?
Enter a number from inclusive:
The player has cards with shape CIRCLE and number
Would you like to:
Ask a question.
Guess a card.
Which option would you like?
Which question would you like to ask?
How many cards with a certain colour?
How many cards with a certain shape?
How many cards with a certain number?
How many cards with a certain colour and number?
How many cards with a certain shape and number?
How many cards with a certain colour and shape?
Which option would you like?
The colour options are:
RED
BLUE
GREEN
YELLOW
Which colour do you want?
The shape options are:
HEXAGON
CIRCLE
DIAMOND
RHOMBUS
Which shape do you want?
The player has cards with colour GREEN and shape CIRCLE.
Would you like to:
Ask a question.
Guess a card.
Which option would you like?
That is not an option, try again.
Would you like to:
Ask a question.
Guess a card.
Which option would you like? dfa
That is not an option, try again.
Would you like to:
Ask a question.
Guess a card.
Which option would you like?
The colour options are:
RED
BLUE
GREEN
YELLOW
Which colour do you want?
The shape options are:
HEXAGON
CIRCLE
DIAMOND
RHOMBUS
Which shape do you want?
Enter a number from inclusive:
The player has the card RED, HEXAGON
Good guess!
Would you like to:
Ask a question.
Guess a card.
Which option would you like?
The colour options are:
RED
BLUE
GREEN
YELLOW
Which colour do you want?
The shape options are:
HEXAGON
CIRCLE
DIAMOND
RHOMBUS
Which shape do you want?
Enter a number from inclusive:
The player has the card RED, HEXAGONin PYTHON
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