A program prints "Hello" only if x > 0.
If x = 0, what does the program print?
Nothing
Which of the following components is responsible for the main processing?
CPU (Central Processing Unit), GPU (Graphics Processing Unit), RAM, Case
CPU (Central Processing Unit)
What is this 1010 (base 2) in decimal
10
This is a container used in code to store a value like a number or a word.
Variable
A loop runs from i = 0 to i = 10, printing i each time.
How many numbers are printed?
11
What does RAM stand for?
Random Assortment Mechanism, Real Arithmetic Management, Random Access Memory, Regional Accessible Method
Random Access Memory
Convert 246 from octal to hexadecimal
A6 (Base 16)
This part of code repeats instructions until a condition is met.
Loop
An array has indices from 0 to 9.
How many elements are in the array?
10
How small are transistors in the latest chips?
4 nanometers, 4 picometers, 4 micrometers, 4 millimeters
4 nanometers
Find f(12, 7) given:
f(x, y) =
• f(x − 1, y + 2) + 3 if x > y
• 2 × f(x + 1, y − 1) − 5 if x < y
• x × x + y if x = y
525
This statement lets a program make a decision based on a condition.
If statement
A list contains the numbers 1, 2, 3, 4, 5.
A program removes all even numbers and then doubles each remaining number.
What is the final list?
[2,6,10]
What is Moore’s Law?
number of transistors on a microchip doubles approximately every two years
3A9B (base 16)
35233 (Base 8)
This structure stores multiple values in one place and accesses them using an index.
Array
(or List, depending on language)
A function returns true if any input is true.
All inputs are false.
How many inputs must be checked before the function returns false?
All of them
What is photolithography?
Precise patterning of geometric patterns from a photomask to a light-sensitive photoresist
32 (base 8) + 1011 (base 2) + 352 (base 10) + AF (base 16) = ?
Express the answer in Hex
234 (base 16)
This piece of code is a reusable block that performs a specific task.
Function
(or Method)