0% found this document useful (0 votes)
4 views5 pages

Class 9 Python practice questions for Term1-1

The document contains practice exercises for Class 9 students on Python programming, including fill-in-the-blank questions, true/false statements, and multiple-choice questions. It also summarizes key concepts such as the process of writing a Python program, the use of IDLE, and the importance of keywords and operators. Additionally, it highlights the case sensitivity of Python and provides information on identifiers and data types.

Uploaded by

mabelsankalp889
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views5 pages

Class 9 Python practice questions for Term1-1

The document contains practice exercises for Class 9 students on Python programming, including fill-in-the-blank questions, true/false statements, and multiple-choice questions. It also summarizes key concepts such as the process of writing a Python program, the use of IDLE, and the importance of keywords and operators. Additionally, it highlights the case sensitivity of Python and provides information on identifiers and data types.

Uploaded by

mabelsankalp889
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Class 9 (2022)

Python Chapter 1 (Practice Exercises)

Exercises
1. Fill in the blanks
1. ____ is the smallest valid unit in a program.
2. The full form of IDLE is ____________.
3. The ____ operator Integer divides the first number by the second and returns
an integer
4. ___, ____, ___ are example of keywords
5. The shortcut to run a Python module is ___.
6. The ________ function is used to accept user input in a python program
7. The ___ is an interactive window where you can type Python commands and
see the output in the same window.
8. The ___ is a blank space character used in Python.
9. The full form of HLL is ________.
10. ___ and __ are relational operators used in Python coding.

2. Write T for True and F for False


1. Print(“Hello”) is a valid command.
2. The output of 30 * 10 - 9 is equal to 30.
3. Values are assigned to variables using assignment operator (=).
4. * has greater precedence than /
5. The output of (9+5) * 10 is the same as 9+ 5 * 10.
6. The Python interpreter scans the whole program at one time.

7. Programs written in the script mode can be saved.


8. Python commands are not affected by the case of the commands.
9. 2**5 is 10
10. exam_100 is a valid variable name.

3. Multiple Choice questions


1 To convert a Python program to machine language we need a
a. Translator b. Interpreter c. Converter d. Antivirus

2. This is not a valid token in Python


a. Identifier b. Keyword c. Literal d. variable

4. The short-cut key to save a python script is


a. Ctrl + F b. CTRL + S c. CTRL + D d. CTRL + Z

5. The command to display the sum of 80 and 300 is


a. Print (80+300) b. print (80+300) c. print (“80 + 300”) d. Options a and b

6. In the script mode files are saved with the extension


a. .psy b. .py c. .exe. d. .cpp

7 The output of 5%3 is


a. 1 b. 2 c. 3 d. 1.5

7. The output of 8//2 is


a.4 b. 4.0 c. 2 d.2.0

5 Give 2 examples of each of the following used in Python programming


language
1. Keywords /reserved words
2. Arithmetic operators
3. Symbols used in Python language
4. Identifiers or variable names
Let us Summarise
• Process of writing a program in Python -
1) Write the program using a text editor -2) Use the Python Interpreter to
convert it to machine language-3) Execute / Run the program.
• Python IDE is called IDLE (Integrated Development and Learning
Environment).
• To install the Python IDLE on your computer, first you have to download it
from https://www.python.org/downloads/
• The python IDLE can be used in two modes: Interactive mode and Script
mode
• Interactive mode commands are entered directly in the IDLE from the
keyboard.
• The print() command is used to display the output on the screen
• The input() command is used to accept input from the user.
• Python is a case-sensitive language.
• If an arithmetic expression contains more than one operator, higher
precedence operators are applied before the lower precedence.
• Script mode allows us to write Python programs as functions and save them
for reuse. The files are saved with an extension as .psy.
• Character set in Python consists of characters such as letters, digits or special
symbols
• Token is the smallest meaningful element of a Python script.
• Identifiers, keywords, literals, operators and punctuators are examples of
tokens.
• Operator is a symbol or word that performs a kind of operation on given
values and returns a result. Arithmetic and relational are types of operators
• A variable is a named memory location which is used to store data.
• Int, float, str, bool are built in data types in Python
• Python keywords are words which have some special meaning in the Python
programming language and cannot be used as variable names.

Lab Activity – Do these programs

You might also like