Python Programs Basics
Python Programs Basics
Practical 1
Aim: Installing and setting up the Python IDLE interpreter. Executing simple statements like
expression statement (numeric and Boolean types), assert, assignment, delete statements;
the print function for output, the input function.
• Installing and setting up the Python IDLE interpreter.
Step 1: Install the python IDLE from the site https://www.python.org/downloads/ according to
the user’s PC operating system.
Once done close the setup window and open Python IDLE by going to the start menu
1
SEM 1 Python Programing-1 LAB MANUAL
• Executing simple statements like expression statement (numeric and Boolean types)
• Assert statement
2
SEM 1 Python Programing-1 LAB MANUAL
• Assignment statements
• Delete statements
• Print function
3
SEM 1 Python Programing-1 LAB MANUAL
1. Write a python program to declare three variables with values (i.e., Principal, Rate of
Interest and Number of Years) and display the simple interest amount. (script mode)
2. Write a python program to declare a variable “Name check” assign a string value to it.
Demonstrate the use of assert statement to check the correct name stored in variable.
4. Write a python program to display the value stored in variables (Name, Class, Address,
Date of Birth).
4
SEM 1 Python Programing-1 LAB MANUAL
INPUT FUNCTION
1. Write a python program to take the input from the user and perform basic arithmetic
operations.
2. Write a python program to take the input (i.e. radius of a circle) from the user and
display the area of the circle and circumference of the circle.
5
SEM 1 Python Programing-1 LAB MANUAL
3. Write a python program to take the input (i.e. length and breadth) from the user and
display the area of the rectangle.
4. Write a python program to take the input (i.e. table of) from the user and display
multiplication table of it.
6
SEM 1 Python Programing-1 LAB MANUAL