Preskoči na glavni sadržaj
Prijava
Sign up for FREE
arrow_back
Biblioteka

Y9 - Computational Thinking & Problem Solving - Lesson 1

star
star
star
star
star
Posljednje ažuriranje 5 months ago
10
Napomena autora:

Students already use algorithms every day. This lesson is about making them conscious of that fact and giving them the formal language to describe it. The goal is discovery, not memorization.

Computational Thinking & Algorithms
Exit Ticket
Obavezno
3
Obavezno
1
Obavezno
1
Obavezno
10

Lesson 1: Algorithms of Secrecy - Engineering a Cipher

Core Philosophy: This lesson frames algorithms as powerful tools for solving significant problems, in this case, information security. Students will act as cryptographers, using the pillars of computational thinking to understand, define, and execute an encryption algorithm.

Learning Objectives:

By the end of this lesson, you will be able to:

  1. Connect the four pillars of computational thinking to a specific problem.

  2. Define and execute the steps of a substitution cipher (the Caesar cipher).

  3. Write a precise algorithm for both encrypting and decrypting a message with a given key.

Block 1: The Hook - An Unbreakable Message? (5 mins)

TOP SECRET MESSAGE INTERCEPTED

AIPP HSRI WXYHIRX.

We believe this is an important message, but the code is unknown.

Your first task is to analyse it.

  • What do you notice?

  • What patterns can you see?

  • Do you have any theories on how to crack it?

1
Pitanje 1
1.

Describe your initial observations and any ideas you have for decoding the message.

Block 2: Recap - The Tools for the Job (8 mins)

To solve a problem like this, computer scientists use a mental toolkit called Computational Thinking.

Let's quickly recap the four key tools:

  • Decomposition: Breaking the complex problem (cracking the code) into smaller parts (figuring out one letter or word).

  • Pattern Recognition: Looking for similarities or patterns. Is every 'R' always a 'Y'? Does the word length match common English words?

  • Abstraction: Ignoring irrelevant details. For now, we can ignore the punctuation and focus only on how the letters are being transformed.

  • Algorithms: If we identify the pattern, we can design a precise, step-by-step set of instructions to decode this message and any other message using the same method.

Obavezno
4
Pitanje 2
2.

Match the thinking tools to the actions:

  • Trying to solve just the first word "AIPP".

  • Focusing only on the letters and ignoring the spaces.

  • Noticing that double letters like "PP" appear in the coded text.

  • Writing a step-by-step guide to decode the message.

  • Decomposition

  • Pattern Recognition

  • Abstraction

  • Algorithm Design

Block 3: Explain - The Caesar Cipher Algorithm (10 mins)

The code you're looking at is a Caesar Cipher, one of the oldest forms of encryption, used by Julius Caesar himself. It's a simple substitution cipher where every letter of the plaintext is replaced by a letter some fixed number of positions down the alphabet. This "fixed number" is called the key.

The algorithm for encrypting with a key of 3 is:

  1. Take your plaintext letter (e.g., 'A').

  2. Find its position in the alphabet.

  3. Shift 3 places forward ('A' becomes 'D').

  4. Write down the new letter. If you go past 'Z', you loop back to 'A'.

Your task:

The secret message 'AIPP HSRI WXYHIRX.' was encrypted with a key of 4. Use the inverse of the algorithm above to decrypt it.

Obavezno
2
Pitanje 3
3.

What is the original message?

Block 4: The Main Activity - Becoming the Cryptographer (15 mins)

Task 1: Encryption

Your turn to send a secret message. Encrypt the word ALGORITHM using a Caesar cipher with a key of 5.

Show your work by listing the original letter and the new, encrypted letter.

Example: H -> M

Task 2: Algorithmic Design

Now, think like a programmer.

Write a clear, numbered, step-by-step algorithm that anyone could follow to decrypt any message, as long as they know the key.

Don't write the decrypted message!

Write the instructions to get to it.

(Hint: It will be very similar to the encryption algorithm, but one key step will be different.)

Obavezno
5
Pitanje 4
4.

Write your algorithm with as much precision as needed.

Block 5 : Activity: The Recipe Algorithm

Read through the following recipe:

"Bad" Recipe:

My Quick Pasta Recipe

So, you'll need to boil some water for the pasta. While that's happening, you should chop up an onion. Don't forget to add salt to the water, it gives it flavor. You can start making the sauce by putting the chopped onion in a pan with some oil. After a bit, add a can of chopped tomatoes. Let that simmer. The pasta probably takes about 10 minutes to cook once the water is boiling. Once the pasta is done, drain it and add it to the sauce. Oh, I forgot, you should grate some cheese to put on top at the end. Make sure the stove is on for the sauce and the water!

You should now complete two tasks based on this flawed recipe.

Obavezno
3
Pitanje 5
5.

Task A: Read the recipe. Identify at least three specific problems with the instructions.

Obavezno
0
Pitanje 6
6.

Task B: Rewrite the recipe as a clear, step-by-step algorithm a robot could follow perfectly. Your goal is to finish in the shortest amount of time.

Pitanje 7
7.

Your Definition

In the space below, define what an algorithm is in your own words. Then, give one example of a simple algorithm you follow every day.

Pitanje 8
8.

Identify the Skill

When solving a complex problem, you decide to ignore all the minor, irrelevant details and focus only on the most important information needed to find a solution.

Which of the four pillars of computational thinking is this an example of?

Pitanje 9
9.

Read the following algorithm for getting ready for school. Identify the biggest logical error in the sequence of steps.

  1. Wake up and get out of bed.

  2. Put on your school uniform.

  3. Eat breakfast.

  4. Take a shower.

  5. Brush your teeth.

What is the main problem with this algorithm?

Pitanje 10
10.

You have been given the task of planning a 4-day vacation with 5 of your friends.

Using computational tools, break it down into smaller tasks, see if there are similarities between the small tasks, if yes, identify them, remove the unnecessary details, and write algorithms for at least two of the smaller tasks.

Eg. Approving dates, inviting friends, choosing destination, etc.