The company that created the first personal computer
What is Apple?
The output of:
x = "123"
print(x * 2)
What is "123123"?
x = {1, 2, 3}
print(x[0])
TypeError, because sets are unordered and don’t support indexing
101 in decimal
What is 5?
What the acronym "SQL" stands for
What is Structured Query Language?
The name of the first high-level programming language
FORTRAN
How many times is "Hello" printed?
for i in range(3):
for j in range(2):
print("Hello")
6
What is the error?
def func(x):
x += 1
return x
print(func())
TypeError, because func() is missing a required argument
The number of bits in a byte
What is 8?
The name of an attack where a hacker tricks a user into clicking a disguised link to steal credentials or install malware
What is phishing?
Considered the "father of computer science"
Alan Turing
The output of:
def f(lst=[]):
lst.append(1)
return lst
print(f()) # Call 1
print(f()) # Call 2
[1]
[1, 1]
T/F: There is an error.
for i in range(5):
pass
print(i)
False
The actual words that make up ASCII (what it stands for)
What is American Standard Code for Information Interchange?
What does hashing do in cybersecurity?
Converts data into a fixed-length string that uniquely represents the original input, making it useful for storing passwords securely
The first video game ever created
What does this code do?
def mystery(n):
if n == 0:
return 0
return n + mystery(n-1)
Computes the sum of numbers from 1 to n recursively
What is the error?
def factorial(n):
return n * factorial(n - 1)
print(factorial(5))
RecursionError, because there’s no base case, leading to infinite recursion
The binary representation of 13
What is 1101?
What HTTPS stands for
What is HyperText Transfer Protocol Secure?
The first computer bug
What was the first computer bug?
What is the output?
def mystery(n):
return [i * 2 for i in range(n) if i % 2 == 0]
print(mystery(5))
[0, 4, 8], because it doubles only even numbers in range(n), which are [0, 2, 4]
What is the error?
x = 10
def change():
x += 5
print(x)
change()
UnboundLocalError, because x += 5 tries to modify x inside the function without declaring it as global first
25 in binary
What is 11001?
The purpose of a penetration test ("pen test")
What is: To simulate cyberattacks on a system to find vulnerabilities before real attackers do?