ACADEMIA (Mirpur Campus)
Class: STD-VI, Session: Final Term 2024-2025
Subject – ICT
Chapter- 2 (Supplementary Book)
Introduction to Python
Fill in the blanks:
(a) A tuple consists of a number of values separated by commas.
(b) Python is written in C language.
(c) The extension of the Python file is .py
(d) There are three different types of numeric literals.
(e) Assignment is done with a single equals sign in Python.
Write True or False:
(a) The Python programming language uses a small amount of memory. (False)
(b) Python is available for users for free. (True)
(c) The syntax of the Python programming language is not similar to the English language. (False)
(d) Python is a dynamically typed language. (True)
(e) A tuple is a numeric data type. (False)
Match the following:
(a) Numeric literals are (i) between brackets ([ ])
(b) Tuple is an (ii) parentheses ()
(c) Lists are enclosed (iii) Integer, Float and Complex
(d) Tuples are enclosed in (iv) Start with a number
(e) A Python variable name cannot (v) immutable Python object
Answers:
(a) + (iii)
(b) + (v)
(c) + (i)
(d) + (ii)
(e) + (iv)
Choose correct options: (Exercise- 2)
(a) Python is a ________ object-oriented programming language.
Answer: b) General purpose
(b) Amongst the following, who is the developer of Python programming?
Answer: a) Guido van Rossum
(c) Amongst which of the following is/ are the Numeric Types of Data Types?
Answer: d) All of the mentioned above
(d) Which of the following statements is correct regarding the object-oriented programming
concept in Python?
Answer: b) Objects are real-world entities while classes are not real
(e) Which of the following is not a keyword in Python language?
Answer: a) val
Write answers to the following questions:
Q1) What is Python?
Answer: Python programming language is a general-purpose, interpreted and high-level language
that mainly offers code readability.
Q2) What is a variable in Python?
Answer: Variables are nothing but reserved memory locations to store certain values.
Q3) Write the advantages and disadvantages of Python.
Answer:
Advantages of Python:
1. Easy-to-learn and easy-to-use
2. Improves productivity
3. Interpreted language
4. Open-source
5. Easily portable
Disadvantages of Python:
1. Slow speed
2. Not memory efficient
3. Weak in mobile computing
4. Runtime errors
Q4) What are Python constants?
Answer: A constant is a special type of variable whose value cannot be changed during the
execution of the program.
Q5) Write the rules for the Python variables.
Answer:
Rules for Python variables:
A Python variable name must start with a letter or the underscore character.
A Python variable name cannot start with a number.
It should not contain white space.
A Python variable name can only contain alpha-numeric characters (a-z and 0-9) and
underscores (_).
Variable in Python names are case-sensitive (name, Name and NAME are three different
variables).
The keywords in Python are in lowercase and cannot be used to name the variable in
Python.