Question: 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 3 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:
1. Ask a question.
2. Guess a card.
Which option would you like? 1
Which question would you like to ask?
1. How many cards with a certain colour?
2. How many cards with a certain shape?
3. How many cards with a certain number?
4. How many cards with a certain colour and number?
5. How many cards with a certain shape and number?
6. How many cards with a certain colour and shape?
Which option would you like? 1
The colour options are:
1. RED
2. BLUE
3. GREEN
4. YELLOW
Which colour do you want? 1
The player has 3 cards with colour RED.
Would you like to:
1. Ask a question.
2. Guess a card.
Which option would you like? 1
Which question would you like to ask?
1. How many cards with a certain colour?
2. How many cards with a certain shape?
3. How many cards with a certain number?
4. How many cards with a certain colour and number?
5. How many cards with a certain shape and number?
6. How many cards with a certain colour and shape?
Which option would you like? 2
The shape options are:
1. HEXAGON
2. CIRCLE
3. DIAMOND
4. RHOMBUS
Which shape do you want? 1
The player has 3 cards with shape HEXAGON.
Would you like to:
1. Ask a question.
2. Guess a card.
Which option would you like? 1
Which question would you like to ask?
1. How many cards with a certain colour?
2. How many cards with a certain shape?
3. How many cards with a certain number?
4. How many cards with a certain colour and number?
5. How many cards with a certain shape and number?
6. How many cards with a certain colour and shape?
Which option would you like? 3
Enter a number from 1-4(inclusive): 1
The player has 1 cards with number 1.
Would you like to:
1. Ask a question.
2. Guess a card.
Which option would you like? 1
Which question would you like to ask?
1. How many cards with a certain colour?
2. How many cards with a certain shape?
3. How many cards with a certain number?
4. How many cards with a certain colour and number?
5. How many cards with a certain shape and number?
6. How many cards with a certain colour and shape?
Which option would you like? 4
The colour options are:
1. RED
2. BLUE
3. GREEN
4. YELLOW
Which colour do you want? 2
Enter a number from 1-4(inclusive): 4
The player has 0 cards with colour BLUE and number 4.
Would you like to:
1. Ask a question.
2. Guess a card.
Which option would you like? 1
Which question would you like to ask?
1. How many cards with a certain colour?
2. How many cards with a certain shape?
3. How many cards with a certain number?
4. How many cards with a certain colour and number?
5. How many cards with a certain shape and number?
6. How many cards with a certain colour and shape?
Which option would you like? 5
The shape options are:
1. HEXAGON
2. CIRCLE
3. DIAMOND
4. RHOMBUS
Which shape do you want? 2
Enter a number from 1-4(inclusive): 1
The player has 0 cards with shape CIRCLE and number 1.
Would you like to:
1. Ask a question.
2. Guess a card.
Which option would you like? 1
Which question would you like to ask?
1. How many cards with a certain colour?
2. How many cards with a certain shape?
3. How many cards with a certain number?
4. How many cards with a certain colour and number?
5. How many cards with a certain shape and number?
6. How many cards with a certain colour and shape?
Which option would you like? 6
The colour options are:
1. RED
2. BLUE
3. GREEN
4. YELLOW
Which colour do you want? 3
The shape options are:
1. HEXAGON
2. CIRCLE
3. DIAMOND
4. RHOMBUS
Which shape do you want? 2
The player has 0 cards with colour GREEN and shape CIRCLE.
Would you like to:
1. Ask a question.
2. Guess a card.
Which option would you like? 4
That is not an option, try again.
Would you like to:
1. Ask a question.
2. Guess a card.
Which option would you like? dfa
That is not an option, try again.
Would you like to:
1. Ask a question.
2. Guess a card.
Which option would you like? 2
The colour options are:
1. RED
2. BLUE
3. GREEN
4. YELLOW
Which colour do you want? 1
The shape options are:
1. HEXAGON
2. CIRCLE
3. DIAMOND
4. RHOMBUS
Which shape do you want? 1
Enter a number from 1-4(inclusive): 1
The player has the card (1, RED, HEXAGON).
Good guess!
Would you like to:
1. Ask a question.
2. Guess a card.
Which option would you like? 2
The colour options are:
1. RED
2. BLUE
3. GREEN
4. YELLOW
Which colour do you want? 1
The shape options are:
1. HEXAGON
2. CIRCLE
3. DIAMOND
4. RHOMBUS
Which shape do you want? 1
Enter a number from 1-4(inclusive): 1
The player has the card (1, RED, HEXAGON).in PYTHON

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!