IN THE STORY
Christine finds two notes. Tony separately supplied a trusted fingerprint for the exact text of the correct note.
The idea
== compares two values and produces True or False. if chooses a block of instructions when a condition is true; else handles the other case. A cryptographic hash turns data into a fixed-size fingerprint. This activity uses the supplied hashlib helper. It compares fingerprints; it does not reverse one to read a message. A trusted reference matters: a fingerprint from an untrusted person does not prove authorship.
Your mission
Compare actual with expected so only the unchanged note is accepted.
Replace ____ with the missing expression, then choose Run code. Match the expected output before trying your own changes.
Before you run it
Will changing the final full stop to an exclamation mark still match?
A little help?
Hint 1: a nudge
Use == for comparison. A single = is assignment.
Hint 2: a closer look
The if condition should be actual == expected.
How the answer works
The exact note matches. Altering the text changes its fingerprint in this example. The comparison says the bytes match the trusted reference; it does not say a program is safe to run.
This replaces the code in the editor. Save your version first if you want to keep it.
Make it yours
Try changing a letter, adding a space and removing the punctuation. Keep expected unchanged.