Type A : Short Answer Questions / Conceptual Questions
1. What are tokens in Python? How many types of tokens are allowed in Python? Exemplify your answer.
2. How are keyword different from Identifier?
3. What are literals in Python? How many types of literals are allowed in Python?
4. Can nongraphic characters be used and processed in Python? How? Give examples to support your answer.
5. Out of the following, find those identifiers, which can not be used for naming variables or functions in a Python program:
Price*Qty, class, For, do, 4thCol, totally, Row31, _Amount,
6. How are floating constants represented in python? Give examples to support your answer.
7. How are string-literals represented and implemented in Python ?
8. What are operators ? What is their function ? Give examples of some unary and binary operators.
9. What is an expression and a statement?
10. What all components can a Python program contain ?
11. What are variables ? How are they important for a program?
12. Describe the concept of blocks and body. What is indentation and how is it related to block and body?
13. What are Data types ? How are they important?
14. How many Integer types are supported by Python? Name them.
15. What are immutable and mutable types ? List immutable and mutable types of Python.
16. What are the difference between implicit type conversion and explicit type conversion ?
17. An immutable data type is one that can not change after being created. Give three reasons to use immutable data.
18. What are entry controlled loop ? Which loop is entry controlled loop in Python.
19. Explain the use of pass statement. Illustrate it with an example.
20. Below are seven segment of code, each with part colored. Indicate the data type of each colored part by choosing the correct type of data from the following type.
(a) int (b) float (c) bool (d) str (e) function (f) list of int (g) list of str