x = 5
y = 3
print(x + y)
8
age = 15
print(ag)
Variable name doesn't exist.
1011
11
Difference between hardware and software
Hardware is the physical parts of a computer you can touch, while software is the programs and instructions that tell the computer what to do.
Name the most spoken language in the world
Mandarin
x = 5
x = x + 2
print(x)
7
name = Helen
print(name)
Quotation marks are missing.
11010
26
Why do computers use binary?
Computers use binary because they can easily understand and process two states: on (1) and off (0).
What element is AU in the periodic table?
Gold
a = 10
b = 2
print(a / b)
5.0
x = 10
y = 0
print(x / y)
It will fail since it cannot divide by zero.
0101101
45
Name 5 data types
integer, float, string, boolean, and array.
Which empire was ruled by Julius Caesar?
Roman Empire
x = 2
print(x)
x = x * 2
print(x)
2
4
score = "10"
print(score + 5)
String + integer mismatch.
1110010
114
Purpose of a compiler
A compiler translates code written by a programmer into a language that a computer can understand and run.
Which country gifted the Statue of Liberty to the United States?
France
x = 5
y = 10
temp = x
x = y
y = temp
print(x)
10
x = 5
if x = 5:
print("Hello")
Using = instead of ==
10110111
183
How do variables, data types, and input/output work together in a program?
Input provides data to a program, variables store that data, data types define what kind of data it is, and output displays the results to the user.
What is the only continent with no permanent human population?
Antartica