Welcome to the forty-fifth of Altitude Foundation’s #MicroChallenges2020
Today’s challenge will help you to expand a problem & programme a solution
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 #45
This week, we have been looking at the classic river crossing problem:
A farmer needs to transport a goat, a fox and a bunch of carrots across a river in a boat that can only hold the farmer and one other object or animal.
If left unattended together, the fox would eat the goat, or the goat would eat the carrots.
Today’s challenge is to create an expanded version of the river crossing challenge. What parameters can you add to make it more complicated? (For example: adding a time limit, adding more passengers, adding more locations…)
Once you’ve designed your new challenge, you can then decompose it, abstract the details, constants and variables and then design your new, more complex algorithm.
Remember, you will need to consider:
- What conditions do you need to take into account to solve the problem?
- How can you describe the conditions? (i.e. what logic underpins the problem)?
- What choices does the user need to be allowed to make?
The second point will be particularly important for designing your algorithm – what logic underpins the problem i.e. what processes will you need to run to ensure that the programme determines the right outcome?
- Algorithm design is a key part of the Computer Science GCSE – it might be useful to compare your algorithm to the layout suggested by, for example, the AQA exam board.
- Can you solve your own problem? What is the minimum amount of crossings you have to make?
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).