NEW TOOLS: Let's practice a few new tools that you learned in past lessons.

  • The user enters many names! Split it into a list with this code under input(): guest_list = guests.split()
  • Add the modulo operator to this code to check if the user entered an even or odd number of guests, like this: even_num = num_guests % 2 == 0
  • Change the number in each print(type()) to the variables guests, guest_list, num_guests, and even_num.

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)