Arguments and Parameters – What’s the Difference?

  • In the preceding gradeCenter() function, we defined gradeCenter() to require a value for the variable score. Once we called the function and gave it the information (the assignment’s score), it printed the correct exercise information.
  • The variable score in the definition of gradeCenter() is an example of a parameter, a piece of information the function needs to do its job. The value ” - Score 100” is an example of an argument. An argument is a piece of information that is passed from a function call to a function. When we call the function, we place the value we want the function to work with in parentheses. In this case the argument ” - Score 100” was passed to the function gradeCenter(), and the value was stored in the parameter Score.