QuizSpace

Python week 6 important questions

Week 6 of Programming in Python: Basic collections: lists, tuples. Extra important questions based on the recent, changing patterns of the exams, from basic to advanced. Practise them in learning mode: each question has a worked solution.

Question 1

One correct option

What is printed by the following program?

L = [23, 9, 18, 17, 12]
print(len(L), L[len(L) - 1])
  1. A

    5 17

  2. B

    5 12

  3. C

    IndexError

  4. D

    4 12

Question 2

One correct option

What will be the output of the code below?

L = [26, 29, 28, 8, 23, 13]
print(len(L), L[len(L) - 1])
  1. A

    5 13

  2. B

    6 23

  3. C

    6 13

  4. D

    IndexError

Question 3

One correct option

Consider the program given below. What does it print?

L = [12, 18, 22, 1, 19, 28]
print(L[6])
  1. A

    12

  2. B

    IndexError

  3. C

    28

  4. D

    19

More questions in this week

Authorise with Google to see every question with its answer and explanation and practise it in learning mode.

IMPPractise OPPE 1 PYQs:PythonSystem CommandsJava