STEP 5: Let's use the function parameter variable in our function! We can pass in party theme information!

  • Change the parameter variable name from my_var to theme.
  • Change the string in .set_background() to the variable theme.

We now have a function using one parameter. Every time we call this function, we must provide an argument for the parameter! If we don't, we will get a syntax error. Click Next to call draw_card() with a custom value!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)