Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 27 - 2501_KVS_C-7
P. 27

    3.     List: A list is an ordered, mutable collection of items enclosed in square brackets.
                            Example: fruits = [“apple”, “banana”, “cherry”]

                     4.     Tuple: A tuple is an ordered, immutable collection of items enclosed in parentheses.

                            Example: coordinates = (10, 20)

                     5.       Dictionary: A dictionary is an unordered collection of key-value pairs enclosed in
                            curly braces.
                            Example: student = {“name”: “Akbar”, “age”: 14}

                             Check Your Knowledge

                     A.    Answer the following questions:

                          1.    What do you mean by term keyword? Write any two characteristics of the keyword.

                          2.    Write any three variable naming conventions.

                          3.    Why do you require variables?

                          4.    What is data type? How many data types are supported by Python?

                          5.    Differentiate between Keyword and Variable.

                     B.    Fill in the blanks.
                          1.    ________________ are the reserve words that have special meanings and purposes.

                          2.    A ________________ is simply a memory location that is reserved to store some value.

                          3.    1digit is a ________________ identifier.

                          4.    ________________ refers to type of data and associated operations.

                          5.     ________________ , ________________ and ________________ are supported
                                in Python variable naming.

                     C.   Match the following:

                                          A                                          B
                          1.      Complex is a                         a.    Assignment of value

                          2.      Variable names are                   b.    Case sensitive

                          3.      Python 3.8 contains                  c.    Number data type
                          4.      X=90 termed as                       d.     Data type

                          5.      Dictionary is a                      e.    35 keywords

                                                                                           Python                       25

| 22 23 24 25 26 27 28 29 30 31 32 |