Please enable JavaScript to use CodeHS

Utah Introducción a Python 1 y 2

Description

En esta lección, los alumnos se familiarizan con las listas. Aprenderán por qué se utilizan las listas en los programas y cómo crearlas. Las listas se crean así:

nombre_lista = [elemento_1, elemento_2, elemento_3, ...]
Objective

Students will be able to:

  • Explain why lists are useful in programs
  • Create lists with items of various types
Description

En esta lección, los alumnos aprenden el sistema de indexación positiva y negativa de las listas y cómo se accede a los elementos de una lista.

Objective

Students will be able to:

  • Provide two index values (positive and negative) for any item in a list
  • Access individual items in a list using index values
Description

En esta lección, los alumnos aprenden a actualizar elementos de listas utilizando el valor índice del elemento.

Objective

Students will be able to:

  • Use the index value of an item to update the contents of the item in a list
Description

En esta lección, los alumnos aprenderán varias formas de añadir elementos a una lista existente mediante los métodos insert, extend y append.

Objective

Students will be able to:

  • Use the append method to add a new item to the end of a list
  • Use the extend method to add new items to the end of a list
  • Use the addition operator (+) to add two lists together
  • Use the insert method to add a new item at a specific index in a list
Description

En esta lección, los alumnos aprenderán varias formas de eliminar elementos de una lista existente utilizando los métodos pop y remove y la palabra clave del.

Objective

Students will be able to:

  • Use the pop method with no argument to remove an item from the end of a list
  • Use the pop method to remove an item from a specific index in a list
  • Use the remove method to remove a specific item from a list
  • Use the del keyword to remove an item from a specific index in a list
Description

En esta lección, los alumnos aprenden a utilizar dos nuevos métodos, clasificar y invertir, para modificar elementos de una lista.

Objective

Students will be able to:

  • Use the sort method to organize items in a list by value
  • Use the reverse method to reverse the order of items in a list
Description

En esta lección, los alumnos repasan los contenidos con un Cuestionario de Fin de Unidad de 10 preguntas.

Objective

Students will be able to:

  • Prove their knowledge of the following commands and concepts through a multiple choice quiz:
    • Creating lists (list_name = [item_1, item_2, ...])
    • Index values
    • Accessing list items (list_name[index])
    • Updating list items (list_name[index] = new_value)
    • Adding list items using:
      • append
      • extend
      • insert
      • +
    • Removing list items using:
      • pop
      • remove
      • del
    • Using additional list methods:
      • sort
      • reverse