Embed presentation
Download to read offline
![1
CHAPTER: LIST IN PYTHON
ASSIGNMENT SET â 1
Time: 30 min M.M. â 20
Q1. What do you mean by List in Python? [1]
Q2. Write the output of the following code: [1]
>>> A = [ ]
>>> A
>>> print(A)
Q3. What do you mean by Nested list? Give example [1]
Q4. Which method is used to create an empty List? [1]
Q5. Negative indexing start from right side of the List(T/F) [1]
Q6. Write the code to convert the following string into List. [1]
âcsiplearninghubâ
Q7. Write a program to accept 10 numbers from the user and [2]
add even numbers in a list named âevenlistâ and odd
numbers in a list named âoddlistâ
Q8. Write a function evensum(list) in python that takes list of 10 [2]
numbers as argument and display the sum of all even
numbers in the list.
Q9. What is the difference between slicing and indexing of list? [2]](https://image.slidesharecdn.com/listset-1-201201185050/75/CBSE-Python-List-Assignment-1-2048.jpg)
![2
Q10. Write the output of the following code: [2]
L = [[1,2],[3,4],[5,6]]
print(L[0][0])
print(L[-1])
Q11. Write the output of the following code: [2]
[1,3,7,9] < [3,5,4]
[âAâ,âbâ,âcâ] > [âzâ]
Q12. Write the output of the following code: [4]
S = âcsiplearninghubâ
L = list(S)
1. print(L[-1:-5])
2. print(L[::-1])
3. print(L[1:8:2])
4. print(L[2:5])](https://image.slidesharecdn.com/listset-1-201201185050/85/CBSE-Python-List-Assignment-2-320.jpg)
The document outlines an assignment set focused on Python lists, including fundamental concepts, specific coding tasks, and code outputs. Questions cover topics such as list creation, manipulation, and the functionality of list methods. It provides practical exercises to enhance understanding of list handling in Python.
![1
CHAPTER: LIST IN PYTHON
ASSIGNMENT SET â 1
Time: 30 min M.M. â 20
Q1. What do you mean by List in Python? [1]
Q2. Write the output of the following code: [1]
>>> A = [ ]
>>> A
>>> print(A)
Q3. What do you mean by Nested list? Give example [1]
Q4. Which method is used to create an empty List? [1]
Q5. Negative indexing start from right side of the List(T/F) [1]
Q6. Write the code to convert the following string into List. [1]
âcsiplearninghubâ
Q7. Write a program to accept 10 numbers from the user and [2]
add even numbers in a list named âevenlistâ and odd
numbers in a list named âoddlistâ
Q8. Write a function evensum(list) in python that takes list of 10 [2]
numbers as argument and display the sum of all even
numbers in the list.
Q9. What is the difference between slicing and indexing of list? [2]](https://image.slidesharecdn.com/listset-1-201201185050/75/CBSE-Python-List-Assignment-1-2048.jpg)
![2
Q10. Write the output of the following code: [2]
L = [[1,2],[3,4],[5,6]]
print(L[0][0])
print(L[-1])
Q11. Write the output of the following code: [2]
[1,3,7,9] < [3,5,4]
[âAâ,âbâ,âcâ] > [âzâ]
Q12. Write the output of the following code: [4]
S = âcsiplearninghubâ
L = list(S)
1. print(L[-1:-5])
2. print(L[::-1])
3. print(L[1:8:2])
4. print(L[2:5])](https://image.slidesharecdn.com/listset-1-201201185050/85/CBSE-Python-List-Assignment-2-320.jpg)