Have you ever played the board game “Mastermind”?
If you are not too sure about the rules of this game, you should first check this page.
For this challenge we are going to create this game of mastermind where the end-user plays against the computer. The end-user’s role is to guess the choices of 4 colours made by the computer.
By completing this game we are using all our coding skills using nested loops and IF statements.
We are also learning about how flowcharts can be used to describe a complex algorithm.
Can you create the flowchart for this computer game yourself?
Give it a try. Once done, compare your flowchart with our flowchart:
Note that there is often more than one approach to solve a problem.
Use either your flowchart or the one given above and translate it into programming code using Python.