0% found this document useful (0 votes)
49 views

Ch9 Python- Introduction

Source Code IT class 6th Ch-9 Exercise

Uploaded by

Harmandeep Kaur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Ch9 Python- Introduction

Source Code IT class 6th Ch-9 Exercise

Uploaded by

Harmandeep Kaur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Chapter- 9.

Python - Introduction
EXERCISE:

A. Tick [] the correct answer.

1. a 3. b

2. b 4. c

B. Write 'T' for True and 'F' for False statements.

1. T 3. F 5. T

2. F 4. T 6. T

C. Fill in the blanks.

1. F5 3.Literals 5. statement

2. Keywords 4. Indentation

D. Define The following.

1. Token: A token is a smallest element of a program that is meaningful to the


interpreter. Tokens supported in Python include identifiers, delimiter, keywords, literals
and operators among others.

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.

E. Differentiate between the following.

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.

1. Python was founded by Guido Van Rossum in early 1990's.

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.

An indentation is an empty space at the beginning of block of code. Python uses


indentation to express the block structure of a program.

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.

c. String: It is a sequence of characters (alphabets, numbers, operators and punctuation)


used to store and represent text- based information. Single quotes ('') and double
quotes ("") are used to represent strings in Python.

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.

She can do so by using int function.

You might also like