Help shape GoConqr. What should we add next?

Quiz

Multiple Choice Questions -Lists

Aparna Dhirde 13 questions Updated 17 Mar 2020

Take the quiz

Questions in this quiz (13)

  1. 1What is the output when we execute list(“hello”)?
    1. A[‘h’, ‘e’, ‘l’, ‘l’, ‘o’]
    2. B[‘hello’]
    3. C[‘llo’]
    4. D[‘olleh’]
  2. 2Suppose listExample is [‘h’,’e’,’l’,’l’,’o’], what is len(listExample)?
    1. A5
    2. B4
    3. Cnone
    4. Derror
  3. 3Suppose list1 is [2445,133,12454,123], what is max(list1)?
    1. A2445
    2. B133
    3. C12454
    4. D123
  4. 4Suppose list1 is [1, 5, 9], what is sum(list1)?
    1. A1
    2. B9
    3. C15
    4. Derror
  5. 5Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?
    1. Aerror
    2. Bnone
    3. C25
    4. D2
  6. 6To add a new element to a list we use which command?
    1. Alist1.add(5)
    2. Blist1.append(5)
    3. Clist1.addLast(5)
    4. Dlist1.addEnd(5)
  7. 7Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse()?
    1. A[3, 4, 5, 20, 5, 25, 1, 3]
    2. B[1, 3, 3, 4, 5, 5, 20, 25]
    3. C[25, 20, 5, 5, 4, 3, 3, 1]
    4. D[3, 1, 25, 5, 20, 5, 4, 3]
  8. 8Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.extend([34, 5])?
    1. A[3, 4, 5, 20, 5, 25, 1, 3, 34, 5]
    2. B[1, 3, 3, 4, 5, 5, 20, 25, 34, 5]
    3. C[25, 20, 5, 5, 4, 3, 3, 1, 34, 5]
    4. D[1, 3, 4, 5, 20, 5, 25, 3, 34, 5]
  9. 9Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop(1)?
    1. A[3, 4, 5, 20, 5, 25, 1, 3]
    2. B[1, 3, 3, 4, 5, 5, 20, 25]
    3. C[3, 5, 20, 5, 25, 1, 3]
    4. D[1, 3, 4, 5, 20, 5, 25]
  10. 10Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop()?
    1. A[3, 4, 5, 20, 5, 25, 1]
    2. B[1, 3, 3, 4, 5, 5, 20, 25]
    3. C[3, 5, 20, 5, 25, 1, 3]
    4. D[1, 3, 4, 5, 20, 5, 25]

Information

Description
Quiz on Multiple Choice Questions -Lists, created by Aparna Dhirde on 17/03/2020.
Language
English
Views
77
History
Created on 17 Mar 2020 · updated on 17 Mar 2020
Tags
xi
Rating
No ratings yet
Rate this quiz
Rate this quiz

More on Python Lists and Data Structures

Feedback

What is it about?

What should we add next?