These are quick challenges that you can make some progress on in 15 or 20 minutes. We'll start with these most weeks for students who arrive earlier, and we'll recommend some specific challenges based on which topics we've been covering recently.
If you're looking for something to work on at home, or if you finish another activity early, these are always a good thing to work on!
In Week 1 of the class we learned about Turtles and the things we can draw with them. In this mini-challenge, we will create awards for our turtles!
1. In your favourite colour, create a circle badge with "Best Artist of 2019"
HINT: adjust the font size or circle size so the word fits within the circle.
2. Recreate the "you tried" gold star (or write a more encouraging message!)
HINT:
BONUS CHALLENGE: Can you change your star so it has no inner lines?
(Inner angle is 108)
3. Make the gold star and badge the same colour with a variable.
HINT:
Here's an answer key if you get stuck or want to check your answers!
Can't believe we're already half way through our coding class? Now's a great time to look back on what we've done so far and practice those coding skills. In this mini-challenge, a mischievous Turtle has stolen our snacks and buried them a locked safe! We need to find out where he hid the vault and what the safe combination is!
1. Where did our Turtle hide our snacks?
Luckily, when the Turtle stole our snacks he left his directions behind. Decipher where the Turtle is going to find out where he hid the safe. You can use graph paper to help you out (ask one of the volunteers to give you some paper if you don't have any).
Follow the Turtle's directions on the right, and you can check your answer here.
2. Decipher the password
Being very forgetful, the Turtle thief wrote down the safe's password on a piece of paper. Unfortunately, he encoded it before writing it down!
Match each Blockly code chunk on the left with its written Python code on the right. Careful, there are more Python lines than there are Blockly lines!
Once you've matched the Blockly and Python codes, you can put the safe's letter code in order below.
1
2
3
4
5
E
M
F
A
E
S
T
W
if programming == 'Rad':
print('....')
else:
print('...jk.')
if num_sides == 5 and num_sides <= 5:
print('Not a pentagon')
else if num_sides != 5:
print('Definitely a pentagon')
else:
print('Not sure that's a shape')
if programming == 'Cool':
print('...and awesome.')
else:
print('...jk.')
angle = 360/num_sides
for count in range(int(num_sides)):
turtle.right(angle) turtle.forward(30)
turtle.goto(-2,0)
if num_sides > 5 or num_sides < 5:
print('Not a pentagon')
else if num_sides == 5:
print('Definitely a pentagon')
else:
print('Not sure that's a shape')
num_sides = text_prompt(sides_question)
if programming == 'Rad':
print('....')
else:
print('...jk.')
Put together the password:
1: _______________ 2: _______________ 3: _______________ 4: _______________ 5: _______________
3. Unlock the Turtle's secrets! We need to enter a secret number and draw a secret shape to open the safe.
Luckily the Turtle Thief is slow, and we saw her type "6" into this code. These commands draw the secret shape AND prints the secret number.
What is the secret shape?
What is the secret number?
If you're stuck, you can check your answer with this Trinket:
This week we have a logic puzzle for you to work out those if-statement muscles! Read through the code, figure out those if
s, and tell us what the code will output.
We wrote some code to print out the lyrics to "Baby Shark" but, oops, we messed it up! There are a couple of syntax errors you'll need to fix before the code will even run, and then there might be some more mistakes that will make the output... not what you wanted. See if you can fix our mistakes so that your output matches what's in the "Instructions" tab.
Pick one of the images below and try to draw it using turtles.
Hints:
Spirally triangle
Curvy star 2
Shallow-angle star with colors
Stars on stars on stars
Many-point star
Curvy star
Shallow-angle star
This week and next week, we'll be working to write our own games in Python! If you have an idea for a game that you want to try, that's great and we can help you build it. But if you're not sure what kind of game to build, we have three projects you can try:
Click on the links above and spend a few minutes trying out each game to see which one you might like to code. Then, we'll make a plan on how to do it!
You will be able to run the code interactively, but you will not be able to save your work! Click File>Download as>Notebook
when you're done if you want to save what you've written.
Start with the Connect 4 code, and add in 3 new variables:
When you're done, you should be able to set these 3 variables to whatever number you choose. For example, your board could be 3 across and 10 high, and you need to get 3 in a row to win. You can use the original Connect 4 code (where the user chooses and column and the piece drops as far down as it can), or your modified tic tac toe game (where the user picks both the row and the column).
This is very similar to the "for loop drawing challenge" above, for anybody looking for more practice.
Turtle Party: The focus here is on solving geometry-related problems to draw some really cool stars. Solutions are here if you get stuck or want to check your work! The images below show what your drawing might look like for some of the steps:
Exercise 2 (31 corners)
Exercise 5
Exercise 3 (32 corners)
Exercise 6
Exercise 4a (101 corners, base angle 180)
...check out the step-by-step Trinkets to draw a bullseye or make your very own holiday tree!