Vocabulary
2.2.2
2.2.3
2.2.4
2.2.5-2.2.6
100
refers to an input that has been passed
What is an argument
100
To compare two items which are EQUAL in an if statement, which symbol would you use?
What is ==
100
How do you add a multi-line comment in python?
What is #
100
When referring to a specific place of an item in a list,
What is an index #
100
The appropriate symbol to use to indicate not equal?
What is !=
200
Any legal combination of symbols that represents a value
What is an expression
200
In a range of (5), what would Python return?
What is 0, 1,2 ,3, 4
200
How do you add a docstring within your code?
What is '''
200
How do you make a integer into a string?
What is str()
200
What is the correct way to write a "for" loop?
What is for ___ in ____
300
A block of code given a name that is able to be called by referencing the function name
What is a function
300
Re-write the following equation as a Python mathematical equation. The square root of 49
What is 49**(1./2) or 49**(0.5)
300
Utilizing a mix of human language and programming language to more easily understand what is going on in my code is?
What is psuedocode
300
In the following iteration, the number 11 is in what index #?, 11,12, 13, 4, 2, 1
What is 0
300
What feature or function is necessary to create a list within an aggregator or accumulator loop?
What is .append
400
Rules about what words from a programming language are allowed to go together and how
What is syntax
400
Describe what an iteration is?
What is An iteration is one repetition of a loop
400
In the following block of code, def add_tax(amount, tax_rate): tax_amount = ? return amount + tax_amount
What is amount * tax_rate
400
In the iteration 4,5,6,7. what would be the correct output for the following piece of code? print index(3)*2
What is 14
400
T/F: In Python, list and dictionaries are mutable types. If the argument is not changed inside the function the change will persist after the function returns.
What is false
500
for item in [1, 3, 5, 7]: print item, print item*2-(1),
What is 1, 3, 5, 7 1, 5, 9, 13
500
Answer the following piece of code below. For n in range(4) Print n**2
What is 0,1,4,9
500
def sequence(8): number_list = [] counter = 0 while counter<8: number_list.append(counter) counter = counter + 1 return number_list
What is define stop and then count up by 1 up until the stop point which is 8 but not including 8
500
Write a function to roll one die and return an output from that roll
What is import random def roll_die(x): return random.randint(1, 6)
500
In the following example of outputs, if determining the mode what would it be? ie: 5, 3, 2, 4, 1, 6, 5, 3, 1, 6, 6, 2, 4, 5
What is 6