Game Preview

Lists in Python - Activity#1

  •  English    6     Public
    Identify the concept of Lists to represent and manipulate data structures in a Python program.
  •   Study   Slideshow
  • ____________________ method can be used to add an element at a specified index/location in a list.
    insert( )
  •  10
  • ___________________ method adds a single element to the end of the list.
    append( )
  •  10
  • How do you get the length of the list grades? grades = [2.0, 3.0, 4.0]
    len(grades)
  •  10
  • What is numbers [-3]? numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    8
  •  10
  • Write the Python code that changes the 4th element in list numbers to 9.
    numbers[3] = 9
  •  10
  • What is the output of the following segment?
    ["C"]
  •  10