The __ is the place in our workspace where we see our output.
What is the Console?
The __ statement/keyword does nothing when you execute code, it is used as a placeholder.
What is the Pass Statement?
A function is defined with this keyword.
What is "def"?
This data type is a number that is positive or negative with one or more decimal places.
What is a Float?
True and False are this.
What is a Boolean?
You comment in Python with a __.
What is a Hashtag #?
x = (3,2,1,0)
for item in x:
if item >= 2:
print(item)
elif item == 0:
print(item)
3
2
0
This is called __ing a function.
my_function()
What is Calling?
This is what the bolded part is called.
txt = "Hello World"
print( txt[6:-1] )
What is Slicing?
This is when you change one data type to another. Ex:
y = int(3.14)
What is Casting?
Adding strings together with a + is called __. Ex:
y = "Hello" + "World"
What is Concatenation?
The __ statement executes its block of code regardless if the try block raises an error or not.
What is the Finally Statement?
A __ is the variable listed inside the parentheses of the function definition.
What is a Parameter?
__ is a data type that is ordered, changeable, and allows duplicates.
What is a List?
__ is a data types that is unordered, changeable, but allows no duplicate items.
What is a Set?
% is called __ and it returns the __ between two numbers.
What is Modulo?
What is a Remainder?
summer = ["June","July","August", "September"]
for month in range(len(summer)):
print(month)
0
1
2
3
An __ is the value that is sent the function when it is called.
What is an Argument?
The following is called __ and applies to __ data type.
fruits = ("apple","pear","banana")
(red, green, yellow) = fruits
What is Packing/Unpacking?
What are Tuples?
This data type is called a __.
{"key"}
What is a Set?
Are the following variable naming conventions Correct or Incorrect?
-Must start with a letter or underscore
-Can start with a number
-Only alpha-numeric characters and underscores
Incorrect. "Can't start with a number"
cookies = 6
while cookies != 0:
if cookies == 3:
break
cookies -= 1
print(cookies)
5
4
3
If you don't know how many arguments will be passed into your function add an __ before the parameter name.
What is an asterisk *?
Does the following code produce an error?
my_classes {
"Ms. Frizzle": ["Homeroom", 118, "Block 1"],
"Ms. Frizzle": ["Physics", 118, "Block 3"],
"Mr. Ross": ["Art", 201, "Block 2"],
"Mr. Escalante": ["Calculus", 110, "Block 4"]
}
No, but something will be overridden.
Does the following code produce an error?
my_car = {
"Type": "Ford Mustang",
"Year": 2007,
53299: "id",
"Color": ("red","black")
}
No