0% found this document useful (0 votes)
8 views1 page

Python Practical Exercises for Class 7

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)
8 views1 page

Python Practical Exercises for Class 7

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

Class: 7 Subject: CS Topic: Python Practical Date: October 25, 2024

Instructor: Bhaswar Sir

Write the following program

1. From the user, take library member name, member address, member’s age, membership
expiry year and then print all the information afterwards.
2. Write a program that asks the user for the name of a product, product code, price, quan-
tity in stock, and supplier’s name. After the user inputs this data, display the information
back to them.
3. Create a Python program that accepts the name of an employee, their employee ID, de-
partment, salary, and year of joining. After accepting this information, print it in a struc-
tured format.
4. Write a program that takes the length and width of a rectangle from the user, then calcu-

ZIEL
lates and prints the area and perimeter of the rectangle.
5. Create a Python program that accepts the principal amount, rate of interest, and time (in
years). Calculate and display the simple interest using the formula:

P ×R×T
Simple Interest =
100
where P is the principal, R is the rate, and T is the time.
6. Write a Python program that takes the radius of a circle as input from the user and then
calculates and displays the area and circumference of the circle.
Use:
Area = π × r2
Circumference = 2 × π × r
(Use [Link] for the value of π).
7. Create a program that asks the user to input the base and height of a triangle and calcu-
lates the area using the formula:
1
Area = × Base × Height
2

You might also like