Functions
Basics
Arrays/Strings
Miscellaneous
Loops
100

What can a function do?

Anything

100

Correctly increase a variable named i by 3

i += 3 or i = i+3
100

Does a string use double quotes or single quotes?

Both work

100
If a variable name has a colour what does it mean?

It is a keyword and cannot be a name.

100

What are the two main types of loops?

For and while

200

What keyword is used to end a function?

return

200

How can you print the statement:

Hello

World

In one line

print("Hello\nWorld")
200

Define an array with values of 1, 5, happy, no

arr = [1, 5, 'happy', 'no']

200

What version of python am I using?

Python 3.7.0

200

What comes after a while loop?

A conditional

300

What comes after the name of a function?

Parentheses

300

What can the name of a variable contain?

Letters and underscore

300

Get the subset of an array named arr starting from the 1st element and ending at the 5th element.

arr[0, 5]

300

Name 3 other programming languages other than Python?

Answers vary

300

How many times would "meow" print:

for i in range(2, 10, 2):

   print("meow")

4

400

How does an array call a function?

[array name].[function name]

400

What is a conditional?

A true of false statement

400

How do you find the length of an array?

len(arr)

400
What is the difference between print statements in Python 2 and Python 3
The parentheses
400

How many times will "meow" print out:

i = 3

while (i > 3):

   print("meow")

   i -= 1

0
500

What is it called when a function does not return any value?

Void

500

How does the computer know what code is inside of a function/loop and what is outside?

Indents
500

How do you remove and return the value at index 5?

arr.pop(5)

500

What are the two different ways to name a variable with multiple words?

camelCase and underscore

500

Using python and loops create a rectangle of stars with a width of 20 and a height of 100.

Answer vary
M
e
n
u