Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1print("Hello") | AMachine code that the CPU can run directly; it is what source code becomes after translation | |
| 210110000 01100001 | BA line of source code written by a programmer in a high-level language (Python); it is one instruction in a program | |
| 3A program is a list of instructions that the computer follows in order, one after another | CThe command is spelled wrongly, which breaks the language's rules. It should be print("Hello"), or the translator will report an error. | |
| 4A programming language has rules (syntax) that programmers must follow when they write source code | DThe CPU only runs machine code. Source code must first be translated by a compiler, an interpreter or an assembler. | |
| 5The CPU can run source code directly without any translation | Eif score >= 50: print("Pass") | |
| 6prnit("Hello") | Fname = input("Name? ") print("Hi " + name) |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
source code — The instructions a programmer writes in a programming language. The CPU cannot run it until a translator turns it into machine code.# This is human-written source code
print("Hi")name = "Sam"
print(name)x = 5
y = x + 2
print(y)# The CPU needs a translator to run this
print("Hi")# Python's rules are its syntax
print("Hi")