Python Math
Variables
If-statements
Loops
Miscellaneous
100

This character denotes the division operator.

What is the forward slash (/) ?

100

This function allows the user to type in their answer.

What is a input()

100

This often used after an if-statement but before an else.

What is an elif-statment?

100

This conditional statement repeats through a set of statements until the condition is no longer true.

What is a while loop?

100

This operator "glues" two strings together.

What is a comma? ,

200

These characters have the highest order of operation in both Maths and Python.

What are parenthesis or brackets ()?

200
This variable type stores decimal numbers.
What is a float?
200
This symbol always goes at the end of an if-statement, elif-statement, or else.

What is a colon? :

200

A loop that repeats forever is called this.

What is an infinite loop?

200

To comment a line in Python, you use this/these character(s).

What is a hashtag or pound sign (#)?

300

The result of 9 // 5

What is 1?

300

Data stored as a string is surrounded by these.

What are quotation marks or speech marks?

300

Below is a piece of sample code. Assume name has already been defined at that there is an else-statement later.

if name == "Mr. Aravind":

print("Hi, Mr. Aravind!")

Find the error.

What is a missing indentation in the second line?

300

Write the output of the code below.

n = 1

while n<6:

     print(n)

     n = n+1

What is 

1

2

3

4

5

300

A named piece of computer memory.

What is a variable?

400

To raise the number 5 to the power of 8, you must use the power operator. This/These symbol(s) denote the power or exponent operator.

What are two asterisks (**) ?

400

This common variable type stores letters, numbers, and symbols. It is the data type found between quotation marks in a print statement.

What is a string?

400

Elif is short for this.

What is else if?

400

The code below does not give an output. Find the error.

n = ""

while n == "yes":

    print("hello!")

    n = input("Would you like to say hello again? ")

What is the first line should say n = "yes" ?

This code won't give an output because it never enters the loop. 

400

Find the output of the code below:

a = 4.5678

rounded_a = round(a, 2)

print(rounded_a)

What is 4.57?

500
Denoted as '%', this operator returns the remainder of a division operation.
What is the modulus?
500

You are writing a code that will output the generation the user was born in using their birth year.  

birth_year = input("What year were you born in? ")

Find the error.

What is missing int() around the input statement?

500
Nested if-statements are this.

What are if-statements within if-statements?

500

The following Python code loops forever. What is it missing?

n = 10

while n<20:

     print(n)

What is an increment statement? Or what is n = n+1 or something similar.

500

The difference between = and == is this and give an example of when you would use each.

What is... = assigns a value and == compares values?

Ex. 

name = input("What is your name? ")

if name == "Alina":

M
e
n
u