Ch9 Python- Introduction
Ch9 Python- Introduction
Python - Introduction
EXERCISE:
1. a 3. b
2. b 4. c
1. T 3. F 5. T
2. F 4. T 6. T
1. F5 3.Literals 5. statement
2. Keywords 4. Indentation
2. Operator: Operator is a special symbol that carries out arithmetic and logical
computations. There are many types of operators in Python like Arithmetic, Relational,
Logical, Assignments, etc.
3. Comments: They are used to explain Python code and make it more readable. Python
interpreter ignores the text written in the comment.
Keywords are the reserved words in Python and cannot be used as constant, variable or
any other identifier names. There are 33 keywords in Python 3.
Literals are the data items that never change their value throughout the program run are
called literals. Theoretically, literal means any number, text or other any information that
represents a value.
F. Answer in 1-2 sentences.
2. A random name made out of letters, digits and/or underscore () to identify a function
name, a program name or a memory location (variable or constant) is known as
identifier.
3. Variables are used to store data in the memory. The data can be numbers, text and/or
objects.
4. A Python program is made up of one or more physical lines. Each physical line may
end with a comment.
G. Answer briefly.
1. Data type is used to define the type of value a data can contain. The data types in
Python are:
a. Integer: Integers are the whole numbers consisting of + or sign without decimal point
such as 1000, -88, etc.
b. Float: Float data type represents floating point numbers which contain decimal point.
For example, 0.5, -4.567, 0.001, etc.
2. Input() and print() are used for standard input and output operations in Python. Input()
is used to get input from user. This function helps user to input the values and text for
the operation. Input() function always returns string value.
Print() is used to print the value of given input value or string. It helps to show output on
screen.
H. Application based-Question.