A number with a decimal point
What is a float?
What is "elif?"
The operator for multiplication.
What is *?
What is nums = []?
Greg's best friend's full name in Diary of Wimpy kid.
Who is Rowley Jefferson?
Can include letters, numbers, or symbols.
What is a string?
To create a function called "banana" using the input "apple", you would first type...
What is
def banana(apple):
The modulo.
What is the operator that returns the remainder of two numbers on dividing them?
The function to find how many elements there are in a list.
What is "len()"?
Complete the song lyric:
Soon may the wellerman come, to bring us sugar and tea and ___.
What is "rum"?
The syntax to transform a float/int into a string.
What is "str()"?
A statement that tests if a number "x" is even or odd and prints the output.
print("x is even")
else:
print("x is odd")
(3 * 4) ** 2
What is 144?
Appends the value 42 to a list titled "scores".
What is scores.append(42)?
The tip of a shoelace.
What is an aglet?
In order to multiply the user input of "x" by 5, you would write this...
What is:
x = float(input("x:"))
OR x = int(input("x:"))
ans = x * 5
Build a function that finds the average of a list of numbers called "numbers".
What is:
def average(numbers):
total = float(sum(numbers))
avg = total/len(numbers)
return avg
a = 23%4
b = a ** 3
b = ...
What is 27?
A dictionary named "groceries" with the keys "apples", "grapes", and "bread", and the corresponding values "4.00", "7.50", and "5.50".
What is
groceries = {"apples": 4.00, "grapes": 7.50, "bread": 5.50}
Complete the script:
Lord Farquaad: "Run run run as fast as you can, you can't catch me, I'm the gingerbread man."
Gingy: "You're a _____".
What is, "you're a monster!"?