Do Now 3.04

Rank the following from easiest to hardest:

  1. Importing built-in functions
  2. Using randint
  3. Abstraction/creating functions
  4. Passing int/str/float/bool arguments into functions
  5. Calling a function
  6. List syntax
  7. Return vs print

We will have a quiz next class covering all of the above topics. Is there any topic you would like to focus on and cover more of?

Type the following into the terminal and run the program:

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 happened? Try writing a similar program but passing in integers instead of a list. What happens?