Welcome to the fifth of Altitude Foundation’s #MicroChallenges2020
In challenge number five, we move around a maze to find the exits.
What’s a Micro Challenge?
These challenges are short activities to help you develop, revise or refresh your coding skills, posted every Monday, Wednesday and Friday.
Micro Challenge #5
Yesterday we started looking at repetition – or iterations as they are called. You can find that challenge here. Today, the challenge is to use that knowledge to move around a maze.
Negotiating the Maze:
— First, you will need to draw a maze or a labyrinth. You can learn more about mazes and labyrinths here.
— Make the labyrinth/maze as intricate and detailed as you like. It might be useful to draw it on squared paper or in Excel/Google Sheets (our later example uses Google Sheets).
- If you don’t have any squared paper and/or want to draw it digitally, you can download squared templates – or use a ruler!
- If you are short of time, you could google a maze to use – or use this example we made earlier.
— Now, decide how far one move will take you (for example: two squares if you are using squared paper). What is the fastest you would be able to get through the maze? One move can be conceptualised as a line of code (move.FORWARD for example).
— How might iterations help you move through the maze faster?
Once you’ve completed the challenge, review it:
— What are the advantages and disadvantages of using iterations? What might you need to pay particular attention to in order to use them most effectively?
— Are there any computer games that you play regularly which might use iterations?
We would love to see what you have created! Please send any pictures, videos, or files of your activities to us – either via Facebook, Twitter or Instagram using #MicroChallenges2020 or to email@example.com. If you are emailing them to us, please let us know if you are happy for us to share your stuff on our social media platforms (with credit, of course).
Sign-up here to receive a weekly email with Micro Challenges top tips and solutions: