That's so fetch
Feelin' Loopy
Function Junction
Basic B-ug
Trust me bro
100

This variable type stores decimal numbers

Float

100

This type of loop runs forever as long as a condition is True

while

100

All functions/methods are required to have this

Parenthesis

100

This character is found at the beginning of a comment

#

100

This statement checks the validity of a statement before creating a branch/new decision

If statement

200

This function always returns a string from user data.

input()

200

What keyword stops a loop immediately?

break

200

This method/function returns the number of characters in a string

len()

200

Since it's not compiled, Python is this type of language.

Interpreted / Scripted

200

write an if statement thats check if a number is positive

if(num > 0):

300

num = int(num)

What is the purpose of this python statement?

Turn the variable number into an integer datatype

300

for i in range(0,5):

     print(i, end="")

What is the output of this for loop?

01234

300

This method divides a string into a list of substrings based on a specific delimiter.

split()

300

These are the three categories of errors in programming

Syntax, Runtime, & Logic errors

300

This modulo expression checks for even numbers

number % 2 == 0

400

What is the point of the parameter "end=" within the print() function?

controls what is appended to the end of the output

400

This operator allows us to loop through a container of data

in

400

This function returns True if all characters in a string are upper or lowercase letters, or numbers 0-9

isalnum()

400

word = "burger king"

print(word[20])

This code demonstrates what error?

Runtime error

400

Why does this code cause an error?

age = input("Enter your age: ")

if age >= 21:

    print("You may have a drink")

input() gives a string. must convert age with int()

500

x = "hello" y = "world"

What does print(x[1:],y)

ello world

500

for letter in "dog":

    print(letter)

What is the above output?

d

o

g

500

This method would be used to swap every instance of a substring for another

replace()

500

number = 5

if(number = 5)

   print("Yes")

What are 2 issues with this code?

we use == for if statement comparison

missing colon after if statement

500

Write an input validation loop that asks the user to enter only a number between 1 and 20

while not(num.isdigit() and 1 < int(num) < 20):

M
e
n
u