how do you add 'Onions' at the end of the list named 'grocery_list'
Back
name = "Derek"
Front
Store "Derek" to a variable named 'name'
Back
%c
Front
print character formatting placeholder
Back
polymorphism
Front
allows us to refer to objects as their superclass and the correct functions are called automatically
Back
del grocery_list[4]
Front
how do you delete a specific item, say the 5th item, in a list named 'grocery_list'
Back
#
Front
Tag for a single line comment
Back
%s
Front
print string formatting placeholder
Back
02468
Front
what is the output of the following code script:
i = 0;
while(i <= 20):
if(i%2 == 0):
print(i, end="")
elif(i == 9):
break
else:
i += 1
continue
i += 1 # This is equivalent to i = i + 1
Back
for x in range(0, 10):
print(x, ' ', end="")
Front
using the 'for' loop, display '0 1 2 3 4 5 6 7 8 9 '
Back
dictionary
Front
a data type that has a unique key for each value; similar to list but you cannot join them together
Back
quote_list = long_string.split(" ")
Front
how do you explode the string named 'long_string' into a list named 'quote_list' at the space delimiter " "
Back
NumPy
Front
a scientific computing python package
Back
pip
Front
manages software packages for python
Back
def
Front
keyword to define a function
Back
print(grocery_list[1:3])
Front
how do you print elements '1' to '3' of the list 'grocery_list'
Back
print('First Item', grocery_list[0])
Front
how do you print "First Item" and appended to that is the first item in the list 'grocery_list'
Back
if (age >= 1) and (age <= 18):
print("birthday")
elif (age == 21) or (age >= 65):
print("birthday")
elif not(age == 30):
print("no birthday")
else:
print("birthday party")
Front
implement the following logic without space preceding ":" symbol:
age between 1 to 18 (inclusive) display "birthday"
age is 21 or more than 65 (inclusive) display "birthday"
age is not 30 display "no birthday"
otherwise, display "birthday party"
Back
test_file.close()
Front
how do you close an open file handle named 'test_file'
Back
+
Front
operator to concatenate strings
Back
tuple
Front
unlike the list, you cannot change this data type after it is created
Back
grocery_list[0] = "Green Juice"
Front
how do you change the value of the first item in the list 'grocery_list' to "Green Juice"
Back
if age >= 21 :
print('tractor trailer')
elif age >= 16 :
print('car')
else :
print("not old enough")
Front
implement the following logic with space preceding the ":" symbol:
age >= 21 display "tractor trailer"
age >= 16 display "car"
age < 16 display "not old enough"