Do Now 3.04
Quiz Announcement
We will have a quiz next class covering all of the above topics.
Discussion
Is there any topic you would like to focus on and cover more of?
In your Notebook
Rank the following from easiest to hardest:
- Importing built-in functions
- Using
randint - Abstraction/creating functions
- Passing int/str/float/bool arguments into functions
- Calling a function
- List syntax
- Return vs print
Type the following into the console
my_list = ['a', 'b', 'c', 'd']
# input: a list of strings
# output: None
def my_function(list_argument):
list_argument[0] = 'z'
print(my_list)
my_function(my_list)
print(my_list)
- What did the program output and what is this program doing?
Bonus
Try writing a similar program but passing in integers instead of a list. What happens?