Flags of the World

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: (Click on flowchart to open in new window)
flags-flowchart

Challenge #1


Analysing this flowchart, can you guess the country corresponding to these six flags? (Type your answer below each flag).

Flag-Tanzania Flag-Turkey Flag-Luxembourg
Flag-Ghana Flag-Sweden Flag-Chad

Challenge #2

Using Flowchart Studio, 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.

Flag-Jamaica Flag-China Flag-Iceland
Flag-Colombia Flag-Cuba Flag-Denmark

Challenge #3


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?

Share Button
Tagged with: ,