✅ MODULE l

4 0 0
                                        

📌 PART – A (2 MARKS EACH)

------------------------------------------

1. List the features of Python.

Python has several features that make it popular:

Easy to learn & read – Python uses simple English-like syntax.

Interpreted language – Code is executed line by line, making debugging easy.

Dynamically typed – No need to declare data types.

Large standard library – Built-in modules for file handling, math, OS, networking, etc.

Portable – Python programs run on Windows, Linux, Mac.

Supports OOP – Classes, objects, inheritance, etc.

---

2. What is the use of comments? How to define single-line and multi-line comments?

Comments are used to explain code and improve readability. They are ignored by the Python interpreter.

Single-line comment:

# This is a single line comment

Multi-line comment:

"""
This is
a multi-line
comment
"""

---

3. Define Identifiers.

Identifiers are names used to identify variables, functions, classes, modules, etc.
Examples: age, total_marks, Student.

---

4. What are keywords? List any 5 Python keywords.

Keywords are reserved words in Python that have predefined meaning.

Examples:
if, else, for, while, return

---

5. Define variables.

A variable is a named memory location used to store data value.
Example:

x = 10
name = "Ram"

---

6. Why Python programming is called dynamically-typed?

Because Python decides the type of a variable at runtime, not before execution.
Example:

x = 10     # integer
x = "Hi"   # now a string

---

7. List the Python built-in core data types.

int

float

str

bool

list

tuple

set

dict

---

8. What is an expression?

An expression is a combination of variables, values and operators that produces a result.
Example:

a + b

---

9. Explain statement in Python.

A statement is a complete instruction in Python.
Examples:
Assignment statement → x = 10
Conditional statement → if x > 10:
Loop statement → for i in range(5):

---

10. Difference between expressions and statements.

Expression Statement

python Where stories live. Discover now