Haunted Code Chronicles - Mission 6: The Attic
The Attic
Students will use encryption and conversion techniques to solve puzzles.
Overview
Mission 6 is the finale, and it is all about codes. Students sweep the LEDs like KITT from Knight Rider, then use the slope-intercept equation to encrypt a message and display it on the line sensor LEDs. They collect trinkets around the attic, convert letters to Morse code on the speaker, and finish by converting letters to ASCII values, shifting them, and showing the result in binary on the user LEDs.
Every challenge in this mission can be solved by brute force, so beginners can finish it with repeated code, while more experienced students can reach for loops, lists, dictionaries, and functions to score higher.
π― Mission Goal: Students will use encryption and conversion techniques to solve puzzles.
Learning Targets
- I can use a loop to sweep LEDs.
- I can use the slope-intercept equation to encrypt a message and display the results using LEDs.
- I can convert letters to Morse Code using CodeBot's speaker.
- I can convert letters to ASCII Code and display the numbers on LEDs.
Key Concepts
- Two of the challenges use codes to convert data: Morse Code and ASCII Codes. This is called character encoding. Documents with the codes are on the floor of the attic.
- Computers represent data numerically using codes. ASCII, the American Standard Code for Information Interchange, is one of the oldest codes still in use today. Each symbol on the keyboard can be converted to a number.
- Symmetric encryption uses a single shared key to both encrypt and decrypt data.
Assessment Opportunities
- Complete the Mission 6 Activity Guide.
- Complete and turn in program Hasselhoff after Objective 1.
- Complete and turn in program TuringCar after Objective 2.
- Complete and turn in program AtticTrinkets after Objective 3.
- Complete and turn in program OpenTrunk after Objective 4.
- Complete and turn in program ASCIISpell after Objective 5.
- Record the score for the mission, found in the class dashboard.
- Write a paragraph about their coding experience and what they learned.
Success Criteria
- Sweep the user LEDs back and forth
- Use the equation for a line to encrypt a 4-digit message
- Display an integer using line sensor LEDs
- Convert letters to speaker beeps using Morse code
- Convert letters to ASCII values and then apply an algorithm to shift them
- Display numbers using binary on user LEDs
Digital Resources
Classroom Materials
- βΈLaptop/computer with Chrome browser
π€
Vocabulary
βΎ
Optional Computing Terms
π
New Python Code
βΎ
leds.ls(10)Uses an integer (y) to turn on line sensor LEDs. Turns on line sensors 3 and 1 because 10 = 0b01010.
Optional Python Code
numbers = [2, 0, 2, 4]Define a list of strings. Define a list of numbers.
num = numbers[0]Β Β # 2Access an item using an index.
morse = {
"a": ".-",
"b": "-...",
"t": "-",
}Define a dictionary with keys.
for symbol in code:Iterate through a dictionary or list.
π
Standards
βΎ
CSTA Standards - Grades 3-5
CSTA Standards - Grades 6-8
CSTA Standards - Grades 9-10
CSTA Standards - Grades 11-12
- Go through the Mission in advance, if you can.
- The first challenge is to program CodeBot's LEDs to resemble the car from Knight Rider. You can introduce the car from the 1980s NBC show with this YouTube video.
- The mission uses binary numbers. You can introduce or review binary numbers with your students by using the binary bracelets activity. Access it through the unplugged activity, or from this website, or this one from NASA.
- Each of the challenges can be solved using brute force, meaning you don't need any for loops or lists or functions. So even beginners can complete the goals by repeating a lot of code. More experienced programmers should use programming concepts like loops, lists, functions, and parameters. Hints provide ideas and some code.
Lesson Outline
The warm-up questions help students think about how computers store data, and the need for data security. It is a good time for discussion. You can even circle back to these questions during or after the mission pack.
ord() function to convert a letter to a number and then display the number using the user LEDs. Students should do the practice code before trying the challenge. This challenge can be a little tricky, because if students don't read the second hint, they will not complete the goals. The algorithm requires a shift in ASCII number. If they do the code without the shift, it should be a fairly easy fix to add it in. They subtract the shift to display the number, but increase the shift with each letter. Using a loop (and a list) works really well and gives bonus points.The reflection questions can be written, shared as a class discussion, or handled through a think-pair-share activity. This is an opportunity to think about programming in general, what they like and don't like about it, and the skills they develop from coding.
Other computer science topics can be discussed and studied during or after this mission, particularly data security, which can meet even more CSTA standards.
A fun follow-up activity is for students to create binary bracelets using ASCII. There are many resources available that give instructions, including the unplugged activity, this website, and this one from NASA. An alternative is to create binary posters. Girls Who Code has an activity for bracelets or posters.