Computer Science - Informatics Practices Class XI/XII Python List Solved Test Part 1

 

Computer Science - Informatics Practices Class XI/XII Python List Solved Test  Part 1

Q1. What do you mean by List in Python?

Q2. The elements in the list can be of ______ type

   (any/fixed)

Q3. Elements in the list are enclosed in _____ brackets

Q4. Values in the list are called _______.

Q5. Lists are ________ in nature (heterogeneous/homogeneous)

Q6. List is a _________ data type. (Linear/non-linear)

Q7. Elements in the list are separated by ______.

Q8. Write the code to create an empty list named ‘L’.

Q9. Write a code to create list of any three colors named

   ‘color’.

Q10. What do you mean by nested list


 

 

SOLUTIONS

Q1. What do you mean by List in Python?

Ans. A list is a data structure which is mutable and 

    ordered sequence of elements.

Q2. The elements in the list can be of ______ type

   (any/fixed)

Ans. any

Q3. Elements in the list are enclosed in _____ brackets

Ans. Square([])

Q4. Values in the list are called _______.

Ans. Item

Q5. Lists are ________ in nature (heterogeneous/homogeneous)

Ans. Heterogeneous

Q6. List is a _________ data type. (Linear/non-linear)

Ans. Linear

Q7. Elements in the list are separated by ______.

Ans. Comma (,)

Q8. Write the code to create an empty list named ‘L’.

Ans. L = []

Q9. Write a code to create list of any three colors named 

   ‘color’.

Ans. color = ["blue", "black", "red"]

Note : You can write any other color of your choice

Q10. What do you mean by nested list

Ans. A list inside another list is called nested list.

 

No comments:

Post a Comment

Most Recently Published

File Handling Test 6

 File Handling Test 6 Q1 . Do we need to use the close() function when we use 'with' statement to open a file? Q2. Which mode you wi...

CS - IP Assignment/Worksheet