Writing Code: A Field Guide: teacher key
How Coding Works, grade 12 edition, written for 12th grade and up. Code is exact instructions for a machine. Algorithms, binary, compilers, early languages, abstraction, open source, Git, jobs, security guidance, testing and Scratch are all part of it.
Read the book. Print this page for the key.
Questions and answers
- What does a compiler do?
- It translates a whole program into binary or machine code that can run (answer)
- It records changes to files over time
- It hides a system behind an API
- What does a version control system let you do?
- Revert files to a previous state (answer)
- Run code without compiling
- Turn bugs into features
- Which agency published Secure by Design guidance first in April 2023, with international partners?
- CISA (answer)
- NASA
- MIT
- A program gives wrong answers because two instructions are in the wrong order. Which kind of bug is that?
- A syntax error
- A logic error (answer)
- A base case
- Why does abstraction make code easier to reuse?
- It hides technical detail behind a simpler interface (answer)
- It turns code into machine language
- It makes every program open source
- In the passage, what do vulnerabilities mean?
- Weaknesses a program could be attacked through (answer)
- Notes the computer does not run
- Steps in an algorithm
Words
- abstraction: hiding detail
- compiler: code translator
- recursion: self-calling function
- vulnerabilities: security weaknesses
- syntax: writing rules