Other

Professional Development

Image

Python Lists

71
plays

50 questions

Show Answers
See Preview
  • 1. Multiple Choice
    30 seconds
    1 pt

    How do you create an empty list in python

    [ ]

    { }

    ( )

  • 2. Multiple Choice
    30 seconds
    1 pt

    How to create a new empty list in python

    [ ]

    list ( )

    list.init( )

    create.list ( )

  • 3. Multiple Choice
    30 seconds
    1 pt

    grades = [2.0, 3.0, 4.0]


    Which of the following code can be used to iterate over the grades list ?

    for grade in grades :

    # todo

    i = 0

    while i < len(grades) :

    #todo

    i = i + 1

    [print ( i ) for i in grades]

    for i, grade in enumerate(grades) :

    # todo

  • Answer choices
    Tags
    Answer choices
    Tags

    Explore all questions with a free account

    Already have an account?