Symbols
Guess the output
Debug
Code
Terminology
100

/

What is the division operator symbol?

100

a = 5
a = 7

print(a*a)

What is 49?

100

person = "penguin"

print(penguin)

What is an undeclared variable?

100
Choose three things to buy from any store, store their prices in variables, and print their total to the console. 
penguin = 40

koala = 20

duck = 50

print(penguin + koala + duck)

100

Name for a location in the memory that has data stored

What is a variable?


200

**

What is the exponent symbol?


200

def add(a, b):

    print(a + b)


add(input("First: "), input("Second: "))


First: blob

Second: not blob
blobnot blob

200

a = 10

b = 0

print(a / b)

What is dividing by 0?

200

Ask the user for a word, and print it twice (with no spaces) to the console. 

def print_twice():

   word = input("Enter a word: ")
   print(word + word)

300

%

What is the modulus operator?

300

def strange(a):

    a = a + a

    print(a)

strange(input("Enter: ") * 2)


Enter: {eg.} penguin

penguinpenguinpenguinpenguin

300

Write a function that takes a first name and last name from user input (two separate inputs) and prints them together with a space.

def full_name():
    first = input("First name: ")
    last = input("Last name: ")
    print(first, last)

300

A value that is hard-coded into the program

What is a literal?

400

//

What is the integer division symbol?


400

def mix(a):

    print(a + "2")

    print(int(a) + 2)

mix(input("Enter: "))


Enter: b
b2

{unicode value of b} + 2, so 98 + 2 = 100 is what gets printed out


alternatively,
Enter: 2
22
4

400

a = 5

b = 10

c = 15

average = a + b + c / 3

print(average)

What is PEMDAS/BEDMAS?

400

Write a function that asks for your current age and a number of years, then prints your age after that many years.

def future_age(current, num_years)
    print(int(current) + int(num_years))

c  = input("How old are you? ")
n = input("How many years to the future?")

future_age(c, n)

400

Variable defined in function declaration

What is a parameter?

500

>>

What is the operator used to redirect output to a file, that appends the content?

500

def combine(x, y):

    print(x * int(y))

combine(input("Word: "), input("Times: ") + "1")


prints out the word (taken from input) y times (also taken from input)

eg.
Word: penguin
Times: 3

penguinpenguinpenguin

500

penguin = "penguin"
age = 8

print(penguin + "is" + age)

What is the lack of str()?

500

Input that is passed into a function

What is an argument?