NUEVAS HERRAMIENTAS: Practiquemos algunas herramientas nuevas que aprendió en lecciones anteriores.

  • ¡El usuario ingresa muchos nombres! Divídalo en una lista con este código en input() : guest_list = guests .split()
  • Agregue el operador de módulo a este código para verificar si el usuario ingresó un número par o impar de invitados, así: even_num = num_guests % 2 == 0
  • Cambie el número en cada print(type()) a las variables guest_list , guests , num_guests y 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
  • Enviar Trabajo
  • Actividad Siguiente
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)