Practical Program List Term 1
Practical Program List Term 1
(class 11)
b) using eval()
2. Write a program to find the average of three numbers
3. Write a program to calculate the area of a rectangle
4. Write a program to find the area of a circle
5. Write a program to find the area of a triangle (using formula….1/2*base*height)
6. Write a program to obtain temperature in Celsius and convert it into Fahrenheit using the
formula
F=C*9/5+32
7. Write a program to read three numbers in three variables and swap first two variables
with the sums of the first and second, second and third numbers respectively.
8. Write a python program that accepts marks in 5 subjects and output average marks.
9.Write a program to read details like name, class age of a student and then print the details
firstly in same line and then in separate lines.
10. Write a program to input a number and print its first five multiples.
11. Write a menu driven program to perform mathematical calculator.
43
4
15. Write a program to check whether a given number is palindrome or not?
16. Write a program to check whether a given number is an Armstrong number.
17. Write a program to display first n prime numbers
18. Write a program to accept a number and find out whether it is a perfect number or not?
Eg.Perfect number is a positive integer that is equal to the sum of its proper divisors. The
smallest perfect number is 6
19. Write a program to accept a decimal number and find its binary number.
20. Write a program to print the following pattern:
A
B C
DEF
GHIJ
KLMNO
21. Write a program to find the sum of the geometric series given below:
S=a+ar+ar2+ar3+ar4+……arn
22. Write a program to find the factorial of a number.
*****
****
***
**
*
28. Write a program to print the following pattern:
A
B B
CCC
DDDD
EEEEE
29. Write a program to count the number of vowels in the string pineapple.
31. Write a program that reads a line, then counts words and displays how many words are
there in the line.
32. Write a program that reads a string and then prints a string that capitalizes every other
letter in the string.
33. Write a program that reads a line, then counts how many times a substring appears in the
line and displays the count.
34. Write a program to accept a string from the user and display the occurrence of words
starting with a vowel in the given string.
35. Write a program that reads a string and displays the longest substring of the given string
Write a menu driven program using functions to perform i)Linear search ii)Binary Search
Write a program to accept a dictionary D and then display the elements in opposite mapping.
Write a program to exchange first half of the elements in a list with second half (Eg: evenlist
=[1,2,3,4] , output should be [3,4,1,2] if it oddlist =[1,2,3,4,5] , output should be [4,5,3,1,2]).
Write a menu driven program to accept name and phone number of employees, display the
contents in the dictionary and search a number based on the name.
Write a menu driven program (using functions) to i) Write the given below text to a file known
as "Fruits.txt" "Neither apple nor pine are in pineapple. Boxing rings are square. Writers
write, but fingers don't fing. Overlook and oversee are opposites. A house can burn up as it
burns down. An alarm goes off by going on." ii) Read the entire contents from fruits.txt iii)
Display the last line of the file fruits.txt iv) Display the words which are having less than 4
letters v)To count and display the total number of alphabet in fruits.txt
Write a menu driven program(using functions) to i)To write the given below text to a file
known as "India.txt" "India is the fastest growing economy.India is looking for more
investments around the globe. The whole world is looking at India as a great market.Most of
the Indians can foresee the heights that India is capable of reaching.’’ ii) Replace every
occurrence of 'the' with 'these' iii) Display the frequency of each word in the file. iv) Display
the lines starting with 'I' or 'T' v) Copy the contents of India.txt to another file India2.txt