0% found this document useful (0 votes)
9 views12 pages

Module - 1 Python

Module 1 covers the basics of Python programming, including keywords, variables, and identifiers. It explains the significance of syntax, naming conventions, and the rules for declaring variables. Additionally, it provides exercises and practical applications to reinforce learning about Python's features and operators.

Uploaded by

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

Module - 1 Python

Module 1 covers the basics of Python programming, including keywords, variables, and identifiers. It explains the significance of syntax, naming conventions, and the rules for declaring variables. Additionally, it provides exercises and practical applications to reinforce learning about Python's features and operators.

Uploaded by

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

MODULE -1

PYTHON
MLO:
IWBAT-
Define keywords in programming languages and recognize their significance in
syntax.
Identify common keywords such as if, else, for, while, and return.
Explain the concept of variables as placeholders for storing data in a program.
Declare and initialize variables of different data types (e.g., integer, string,
boolean).
Define identifiers as names given to variables, functions, or other elements in
code.
Follow naming conventions for identifiers to ensure clarity and consistency in
code readability.
Differentiate between valid and invalid identifiers based on language rules and
best practices.
KEYWORDS

Variables
Values
Indentation
Reserved words/keywords
Statement
Expression
Text book exercises PAGE NO 16

Fill in the blanks:-

1. 3.12
2. Guido Rossum
3. IDE
4. Indentation
5. sys.version
Text book exercises PAGE NO 16

True or False:-

1. True(1)
2. False(0)
3. True(1)
4. True(1)
5. False(0)
Answer the following:-

1.What are the features of Python?


● Easy to learn-simple structure and syntax
● Readable- code blocks are identified by indentation
● Standard library- contains libraries that are portable and cross
platform compatible.
● Interactive Mode-allows interactive testing and debugging
● Database support- provides interface to all the major commercial
databases.
2. Why is Python said to be portable?

Ans. Python can run on a variety of hardware platforms, and has the same
interface on all platforms. Therefore Python is said to be portable.

3. What are the rules for naming variables in Python?

Ans. Must start with a letter or underscore(_)

Must consist of letters, numbers and underscores.

It’s case sensitive.

Reserved words cannot be used.

4. Name five reserved keywords in Python.

and, del, for, in, try


5. Write the function of the arithmetic operators in Python.

+ add
- subtract
* multiply
/ divide
** exponent
// floor division
6. What are %s %d and %f?

%s is used as a placeholder for string values.


%d is used as a placeholders for integer
values.
%f is used as a placeholders for decimal
values
Practical:-
Execute the following expressions in python and write the output.
Match the following:-

1. Interpreter- execute program


2. x=0 - statement
3. **- exponent
4. Variable- value
5. IDLE- Editor
MCQ

1. C
2. C
3. C
4. A
5. D

You might also like