More Challenges¶
CS20-CP1 Apply various problem-solving strategies to solve programming problems throughout Computer Science 20.
CS20-CP2 Use common coding techniques to enhance code elegance and troubleshoot errors throughout Computer Science 20.
CS20-FP2 Investigate how control structures affect program flow.
CS20-FP3 Construct and utilize functions to create reusable pieces of code.
If you have finished off all of steps 1 - 20, and are waiting for your classmates to catch up, take a look at the following challenges. Some of them will require you to do a fair bit of thinking before you begin to code! You will likely find it helpful to think them through with paper/pencil before attempting to write out a solution on the computer.
Star Towers - Version 1¶
Reeborg loves to build - today it is making Star Towers. It has plenty of stars, and wants to make towers that are 3 stars high. Write a program that creates a Star Tower at Reeborg’s starting position, and every other x-position after that (odd x-values).
Open the Star Tower 1 world to implement your solution!
The world will look something like this at the start:
Star Towers - Version 2¶
This time Reeborg wants to build star towers in a cave. There are stalactites on the roof of the cave of differing length, so Reeborg wants to make its towers as tall as it can without bumping into them. Like last time, write a program that creates a Star Tower at Reeborg’s starting position, and every other x-position after that (odd x-values). The height of each Star Tower should allow for one empty square beneath the stalactites.
Open the Star Tower 2 world to implement your solution!
The world will look something like this at the start:
Target Practice¶
Reeborg decides to spend the day practicing its archery skills. Somewhere in the world is a triangular object. Write a program so that allows Reeborg to find this object, and then have it create cross hairs that span the whole world and centre on that target.
Open the Target Practice world to implement your solution!
The world will look something like this at the start:
Line Follower¶
Reeborg loves to hike in the backcounty, but one challenge is that it’s sometimes easy to get lost. Write a program to help Reeborg carefully follow the hiking trail and eventually reach the end of the hiking path.
Open the Line Follower world to implement your solution!
The world will look something like this at the start:
Double the Pile¶
Reeborg has a pile of squares somewhere in front of it, but wants more! Two times more, to be precise. Reeborg is carrying a large number of squares, which you can use to help build the larger pile it wants. Create a pile of squares with exactly two times as many squares. You will always build the new, bigger pile one square to the right of where you find the initial pile.
Open the Double the Pile world to implement your solution!
The world will look something like this at the start:
Find the Center - Version 1¶
Put down a token in the geometrical center of the following world. You are guaranteed that the width of the world will be an odd number, and that it will only be one unit tall. Note that when your program is complete, there should only be one token down in the world.
Open the Find Center 1 world to implement your solution!
The world will look something like this at the start:
Find the Center - Version 2¶
Put down a token in the geometrical center of the following world. You are guaranteed that the width and height of the world will be odd numbers. Note that when your program is complete, there should only be one token down in the world.
Open the Find Center 2 world to implement your solution!
The world will look something like this at the start: