You are on page 1of 5

COMPUTER

SCIENCE
PRACTICAL FILE
(2021-2022)

BY- BHUSHAN GUPTA


CLASS - 12 A
ROLL NO-10

INDEX
S NO. PROGRAM PAGE NO.
01 Write a function in python, which accept a list of marks of
students and return the minimum mark, maximum mark and
the average marks.
02 Write a function in python, which accept a number from user
to return True, if the number is a prime number else return
False.
03 Write a program to print the Fibonacci series using function.

04 Write a function in python, which accept a list of names as


argument and return total number of palindrome names.
05 WAP to print the sum of the series
1+x1/1!+x2/2!+…….xn/(n)!- exponential series.
06 WAP to accept a number, find and display whether it’s a
Armstrong number or not.
07 Write a random number generator that generates random
numbers between 1 and 6 (simulates a dice).
08 WAP in Python to find and display the sum of all the values
which are ending with 3 from a list.
09 WAP to display second largest element of a given list.

10 Recursively find the factorial of a natural number


11 Write a Python program to input names of ‘n’ countries and
their capital and currency, store it in a dictionary and display
in tabular form. Also search and display for a particular
country.
12 Read a text file line by line and display each word separated
by a #.
13 Read a text file and display the number of vowels/ consonants/
uppercase/ lowercase characters in the file.
14 Remove all the lines that contain the character `a' in a file and
write it to another file.
15 Read a CSV file from hard disc and print all the details on the
screen.
16 Write a program to create a text file and print the lines
starting with ‘T’ or ‘P’.
17 Read a text file to print the frequency of the word ‘He’ and
‘She’ found in the file

1. Write a function in python, which accept a list of marks of students and return the
minimum mark, maximum mark and the average marks.
l= list()
n= int(input(" TOTAL NUMBER OF SUBJECTS: "))
for i in range (1, n + 1) :
i = int(input ("enter the marks: "))
x = l.append(i)
minimum=min(l)
maximum=max(l)
totalsum=sum(l)
length=len(l)
average=totalsum/length
print("minimum marks: ", minimum)
print("maximum marks: ", maximum)
print("average marks: ", average)
15.Read a CSV file from hard disc and print all the details on the screen.

16. Write a program to create a text file and print the lines starting with ‘T’ or
‘P’. (Both uppercase and lowercase).
17. Read a text file to print the frequency of the word ‘He’ and ‘She’ found in the file

You might also like