What is the function used for in Python?
To group blocks of code together, only runs when you call it.
This often comes after an if/ elif
else
What does a print statement do?
Displays text in the output screen
print ("Hello world")
Hello world
What country has Tokyo as its capital?
Japan
What is the correct way to call on a function named explore_cave() ?
explore_cave()
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.
What are the two data value types we have learned about
Integer and string
print (4+4)
8
What is the largest planet in our Solar System?
Jupiter
What does 'def' stand for when coding a function?
define
What is the difference between if and elif statements?
if starts a new condition, elif only runs if previous conditions were false
What is a variable
A named container that stores a value to be used later in the program
print (" 4 + 4 ")
4 + 4
In Harry Potter, what is the name of Harry Potter's pet owl?
Hedwig
What do you have to add to the code below?
def greet_person
def greet_person():
What symbol do we use for comparing if something is equal to the other?
if name ____ "Bob":
==
Debug this code:
if name = "Alex":
if name == "Alex":
print (2 * 2 )
4
What does www stand for in a website address?
World wide web
True / False?
You must always use return in a function.
True/False
I don't need to write a condition after my else statement
True
What is an indent
The space at the start of a line to show which code belongs together
player = mage
print (f "Hi + {player}!")
Hi mage!
What is the smallest country in the world?
Vatican City