[Hint: Definition]
Integer
What is ... a w____ n_____?
For example, 0, -3, 5, 12, 112
# Code the classic
# short program
# coders code first.
_____("_____, _____!")
What is ... print("Hello, world!")?
[Hint: Contraction]
elif
What is ... else if?
For example,
if egg == 0:
print("Zero")
elif egg == 1:
print("One")
else:
print("Not zero or one")
# Hint: The output
a = 65
b = 15
c = b % a
print(c)
What is ... 15?
[FYI: The code was tested with JDoodle.]
[Hint: Definition]
def
[Level 0 & 1]
What is ... the keyword used to DEF-ine a function in Python?
[Hint: Definition]
Looping
What is ... when the computer e_____ the s_____ i_____ o_____ and o_____?
[Hint: Definition]
String
What is ... w_____ between d_____ q_____?
For example, "I am a string."
# Swap 9 and 6
# in one line of code
m = 9
n = 6
What is ... m, n = n, m?
[FYI: The code was tested with JDoodle.]
# Hint: The output
i = 5
while True:
print(i)
i = i - 1
if i <= 2:
break
What is ...
5
4
3
?
[FYI: The code was tested with JDoodle.]
# LEVEL 2
# What is the output
# of this code?
x = 5
y = x + 3
y = int(str(y) + "2")
print(y)
What is ... 82?
[FYI: The code was tested with JDoodle.]
[Hint: Definition]
Softcoding
What is ... when a coder codes v_____. Instead of using f____ v_____ (i.e., magic numbers)?
[Hints: Taking the elevator. Driving a car. Using a computer.]
An a_____ is a s_____.
What is ... an abstraction?
The two major versions of Python are versions __.x and __.x.
What is ... 2.x and 3.x?
Or what is ... 2 and 3?
# Hint: The output
word = "!skcor nuH .rM"
reversed_word = word[::-1]
print(reversed_word)
What is ... Mr. Hun rocks! ?
[FYI: The code was tested with JDoodle.]
[Hint: It's binary.]
Python is an interpreted language.
What is ... True?
[Hint: Definition]
Float
What is ... a d_____ n_____?
For example, 0.0, 0.4, 1.3, 10.01
# Hint: The output
print(9 % 5)
What is ... 4?
[FYI: This code was tested with JDoodle.]
square bracket, colon, colon, negative one, square bracket
LEVEL 1
What is ... the "secret" formula to reverse a string (in Python)?
Or what is ... how to reverse a string (in Python)?
# Hint: The output
list = ['b','n','n']
index = 1
for c in range (len(list)):
list.insert(index,'a')
index +=2
print(list)
What is ... ['b', 'a', 'n', 'a', 'n', 'a'] ?
Or what is ... banana?
[FYI: The code was tested with JDoodle.]
Aikido, Tae Kwon Do, Systema, Muay Thai, & western fencing (sabre)
What are ... the martial arts Mr. Hun has studied?
Or what is ... Mr. Hun is a "martial arts master"?
[Hints: Math. Cooking. Making brownies.]
S_____ is similar to o_____ of o_____.
O_____ m_____.
What is ... sequence?
Or what is ... similar to order of operations?
Or what is ... order matters?
[Hint: The coding concept]
=
What is ... the assignment operator?
# Swap values 5 and 3
# in three lines of code.
x = 5
y = 3
z = 0
What is ...
z = x
x = y
y = z
?
[FYI: The code was tested with JDoodle.]
# Hint: The output
nums = [1,19,6,10,-4,12,4,18,20,17,-2]
total = 0
for i in range(len(nums)):
if (i % 2 == 0):
total += nums[i]
print(total)
What is ... 25?
[FYI: The code was tested with JDoodle.]
NYC (aka the Big Apple)
What is ... the city Mr. Hun is originally from?