Function Basics
Conditionals
General Python knowledge
Python outcomes
General Trivia
100

What is the function used for in Python?

To group blocks of code together, only runs when you call it.

100

This often comes after an if/ elif

else

100

What does a print statement do?

Displays text in the output screen

100

print ("Hello world")

Hello world

100

What country has Tokyo as its capital?

Japan

200

What is the correct way to call on a function named explore_cave() ?

explore_cave()

200

What is the difference between if and else statements?

if only runs code if the condition is true, else runs code if all previous conditions are false.

200

What are the two data value types we have learned about

Integer and string

200

print (4+4)

8

200

What is the largest planet in our Solar System?

Jupiter

300

What does 'def' stand for when coding a function?

define

300

What is the difference between if and elif statements?

if starts a new condition, elif only runs if previous conditions were false

300

What is a variable

A named container that stores a value to be used later in the program

300

print (" 4 + 4 ")

4 + 4 

300

In Harry Potter, what is the name of Harry Potter's pet owl?

Hedwig

400

What do you have to add to the code below?

def greet_person

def greet_person():

400

What symbol do we use for comparing if something is equal to the other?

if name ____ "Bob":

==

400

Debug this code:

if name = "Alex":

if name == "Alex":

400

print (2 * 2 )

4

400

What does www stand for in a website address?

World wide web

500

True / False?
You must always use return in a function.

False
500

True/False

I don't need to write a condition after my else statement

True

500

What is an indent

The space at the start of a line to show which code belongs together

500

player = mage

print (f "Hi + {player}!")

Hi mage!

500

What is the smallest country in the world?

Vatican City

M
e
n
u