We are trying to build a program that will ask the end-user to choose a flag amongst six flags. The program will then try to guess the selected flag by asking a maximum of two questions.
Look at the flowchart below used to describe our algorithm.
Analysing this flowchart, can you guess the country corresponding to these six flags? (Type your answer below each flag).
Click on flowchart to enlarge.
Design a similar flowchart used for the computer the guess the correct flag amonst these six new flags. You will need to ask different questions.
Can you tweak the algorithm from the previous task to get the computer to guess the correct flag amongst all twelve flags, using a maximum of three consecutive questions?