2nd Semester Intro to Computer Science

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:

  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

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)
  1. 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?

Edit this page Report an issue