In this article, you will get important QnA Lists in Python class 11. So here we begin!
Topics Covered
QnA Lists in Python class 11
In the first section of QnA Creating Lists in Python class 11 let’s talk about Objective type questions. These objective type questions contain fill in the blanks, MCQs and True/False. So lets we start with them!
Part I
Objective Type Questions
- The _________ is a collection of values of any type.
- In lists, you can change the elements of a list in place. (True/False)
- The _______ brackets are used to enclose the values of a list.
- The property which changes the element of a list in place but not changes the memory address is known as __________.
- In the statement l = [], a _________ type of a list is created.
- You can split list elements across several lines. (True/False)
- A list cannot have another list inside one list. (True/False)
- The ___________ function allows to create a list of user’s input values enclosed in square brackets.
- l1= list(‘ClassXI’) returns :
- [‘C’,’l’,’a’,’s’,’s’,’X’,’I’]
- [‘ClassXI’]
- l1[‘ClassXI’]
- All of the above
- The position of each element in the list is considered as ___________.
Let’s have look at answers of all of the above questions for QnA Lists in Python class 11.
Answers
- list
- True
- [] – Square Brackets
- mutability
- empty
- True
- False
- eval()
- 1. [‘C’,’l’,’a’,’s’,’s’,’X’,’I’]
- index
In the next section of QnA Lists in Python class 11, lets talk about short answer questions.
Short answer questions
For answers of the following questions, refer this article:
- What do you mean by a python list?
- What are mutable and immutable types?
- Write statements to create the following lists in python:
- Empty List named MyList
- A list of a range of odd numbers from 1 to 10 named odd_list_1to10
- Create a list of values with the addition of 0.5 to the next value. Suppose you start at 5 then the next value will be 5.5 and then the next value will be 6.0 and so on.
- Create list l with your name
- Create a list of your favourite colours
- Explain various ways of creating a list with example.
- Write one similarity and one difference between lists and strings.
- What do you mean by index in the context of lists? Explain in brief.
- Create a list std to store the values like ID, student name, city, fees and contactno.
- What is the use of eval() function? Explain with an example.
- Create a list by user input to store various values related to generate an invoice. (Use at least 5 values)
- Consider the given list and find the output/error of below given questions: l = [‘Sachin’,55,[56,78,90,67],’I’]
- print(l[])
- print(l[3])
- print(l[2])
- print(l[2][2])
- print(l(2,1))
- print(l[2,1])
- What is a nested list? Explain your answer with a suitable example.
- Assume the output for the following python lists when print(l) is written for the output:
- l = list(‘Assignments’)
- l = list(input(“Enter the value:”)) the input is – 54321
- l = eval(input(“Enter values”))
Practice these questions and find the answers from the recommended article. That’s all from QnA Lists in Python class 11 focused on creating lists in python.
Share your views/feedback/suggestions about this article in the comment section.
Thank you for