Python Project Full Template
Python Project Full Template
Bangalore North
Avalahalli, Yelahanka
Computer Science(083)
TERM – 1 PRACTICAL RECORD FILE
SUBMITTED BY
NAME :
ROLL NO :
CLASS :
YEAR : 2024-25
LABORATORY CERTIFICATE
Page 1 of 28
Name : Class:
Teacher In-
Charge
........................ ...
.....................
Examiner’s Signature
Principal
Date of Practical Examination:
Term 1: / / 2024
Term 2 : / /2024
Page 2 of 28
PYTHO
N
Page 3 of 28
PROGR
AMS
Page 4 of 28
INDEX
SL. NAME OF PROGRAM PAGE DATE SIGN
NO NO
1. Write a python program to find the average 4-5 1/7/2024
of five subjects and calculate their grade
Page 5 of 28
12 Write a Menu Driven program that executes as 25/09/2024
long as the user wants.
1. Create a List
2. Append a value to the List
3. Extend the List
4. Insert a value at a particular index 5.
Exit
13 To write a program to input your friend’s names 18/10/2024
and their phone numbers and store them in the
dictionary as the key-value pair.
Page 6 of 28
17 Write a menu driven program to input your 20/112024
friends names and their phone numbers and
store them in the dictionary as the key-value
pair. Perform the following operations on
the dictionary.:
a. Display the name and phone number
of all your friends
b. Add a new key- value pair in this
dictionary and display the modified dictionary
c. Delete a particular friend from
the dictionary
d. Modify the phone number of an existing
friend
e. Check if the friend is present in
the dictionary
f. Display the dictionary in sorted order
of names
18 Write a program to repeatedly ask the user to 21/11/2024
enter product names and prices. Store all of
these in a dictionary whose keys are the product
names and whose values are the prices.
****when the user is done entering products
and prices ,allow them to repeatedly enter a
product name and print the corresponding price
or print a message product does not exist.
19 WAP to accept a list of values and display 23/06/2024
options for remove all 1. odd numbers
from the list
2. Even numbers
20 WAP to accept a list of values and 24/11/2024
display options for deleting elements in a
list with options for
1. Delete using value
2. Delete using index
3. Delete a sublist
Page 7 of 28
1. Write a python program to find the average of five subjects and
calculate their grade:
Ans:
Source code:
Output:
Page 8 of 28
2. Write a python program to find the sales price of an item with a given
cost and discount percentage:
Code:
Output:
Page 9 of 28
3. Write a python program to calculate perimeter, circumference and
area of shapes such as triangle, rectangle square and circle: ‘
Code:
Output:
Page 10 of 28
4. Write a python program to calculate simple and compound interest:
Code:
Output:
Page 11 of 28
5. Write a python program to find the largest and smaller number in a list:
Code:
Output:
Page 12 of 28
6) Write a python program to find third largest and third smallest number
from a list:
Code:
Output:
Page 13 of 28
7) Write a python program to find the sum of squares of the first 10
natural numbers:
Code:
Output:
Page 14 of 28
8) Write a python program to count the number of vowels in a user
entered string:
Code:
Output:
Page 15 of 28
9) Write a python program to print the number of occurences of a given
alphabet in each string:
Code:
Output:
Page 16 of 28
10. Write a python program to display numbers from -10 to -1 using for
loop:
Code:
Output:
Page 17 of 28
11. Write a python program to check if the entered number/string is a
palindrome or not
Code:
Output:
Page 18 of 28
12. Write a Menu Driven program that executes as long as the user wants.
i. Create a list
ii. Append a value to the list
iii. Extend the list
iv. Insert a value at a particular index
v. Exit
Code:
Output:
Page 19 of 28
13. To write a program to input your friend’s name and their phone
numbers and store them in the dictionary as the key-value pair.
Code:
Output:
Page 20 of 28
14. Write a program to accept five numbers from the user and store these
numbers in a tuple. Display the following from the tuple:
i. Largest number;
Code:
Output:
Page 21 of 28
15. Write a Menu Driven program that executes as long as the user wants.
(Use math and random Module)
v. Exit
Code:
Output:
Page 22 of 28
16. Write a program that accepts a string, count and print the following:
i. No. of Characters
Code:
Output:
Page 23 of 28
17. Write a menu driven program to input your friends name and their
phone numbers and store them in the dictionary as key-value pair. Perform
the following operations on the dictionary.
b. Add a new key-value pair in this dictionary and display the modifies
dictionary
Code:
Output:
Page 24 of 28
18. Write a program to repeatedly ask the user to enter product names and
prices. Store all of these in a dictionary whose keys are the product names
and whose values are the prices. ****when the user is done entering
products and prices, allow them to repeatedly enter a product name and
print the corresponding price or print a message product does not exist
Code:
Output:
Page 25 of 28
19. WAP to accept a list of values and display options for remove all
Code:
Output:
Page 26 of 28
20. WAP to accept a list of values and display options for deleting elements
in a list with options for
Code:
Output:
Page 27 of 28
Page 28 of 28