STEP 2: Let's set up our function! We won't see it run just yet: remember, we have to call functions to run them.

  • In LOGIC, go to and drag Define Function with Parameter into your program.
  • Change the name of the function from my_function() to pig_latin().
  • Change the parameter variable name from my_var to word.
  • Go to and drop String Variable INSIDE the function.

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)