PASO 10: ¡Ahora la sección del cuerpo! Necesitaremos una lista de etiquetas de imágenes para elegir.

  • En LÓGICA, de , arrastre otra List of Strings a la primera sección de su programa, justo debajo head_list .
  • Cambie el nombre de la lista a body_list .
  • Proporcione body_list 6 valores de cadena: "middle1" , "middle2" y así sucesivamente, hasta "middle6" .

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

######################################################################## # PLACE LIST CREATIONS HERE # ######################################################################## stage_list = ["moon", "mars", "jupiter", "pluto", "space", "city"] head_list = ["head1", "head2", "head3", "head4", "head5", "head6"] ######################################################################## # PLACE ALL OTHER CODE BELOW THIS # ######################################################################## stage_image = stage_list[1] stage.set_background(stage_image) random_head = random.randint(0, 5) head_image = head_list[random_head] # sprite = codesters.Sprite("image", x, y) head = codesters.Sprite(head_image, 0, 83)
  • Run Code
  • Enviar Trabajo
  • Actividad Siguiente
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)