What do I need to change to delete "number = 5"?

https://www.codecademy.com/courses/learn-python-3/lessons/intro-to-functions/exercises/parameters?action=resume_content_item

Where do I add function so I can delete number = 5?

Now, modify the function definition so that it has a parameter called number . Then delete the number = 5 assignment on the first line of the function.

Pass the number 1 into your function call.

We start out with,

def mult_two_add_three():
  number = 5

The parameter list is empty, and the variable is declared and defined directly in the function body.

We want to be able to supply the function with any value for number so define it in the parameter list, as the instruction suggests…

def mult_two_add_three(number):
  #number = 5

Comment out the declaration line and run the code with the arguments given in this and the next three steps.

5 Likes