IT 116: Introduction to Scripting
Quiz 5 Answers

  1. What do you call the functions that are always available in Python and do not have to be imported?
    built-in functions
  2. What do you call a variable that is defined inside a function?
    a local variable
  3. If the variable is defined inside a function, can another function use that variable?
    no
  4. If the variable is defined inside a function, can the code outside all functions use that variable?
    no
  5. What do you call a variable that is defined outside any function?
    a global variable
  6. Can a function use a variable defined outside any function?
    yes
  7. What do you call the variables that are listed inside the parentheses of a function header?
    parameters
  8. Where do parameters get their values?
    from the corresponding argument in the function call
  9. What do you call the expressions (values), inside a function call?
    arguments
  10. Write the function cheer that has a single variable called team in its function header and prints a cheer for that team.
    def cheer(team):
        print("Go " + team + "!")