Computer Science Practical Kunal Balyan
Computer Science Practical Kunal Balyan
PRACTICAL FILE
Submitted by – KUNAL
Class – 12th Science
Roll number –
Submitted to – Mr. Sandeep Singh
PROGRAM - 1
1. Write a Program to show prime numbers in the given
range.
RESULT
PROGRAM - 2
RESULT
PROGRAM - 3
3. Find the largest/smallest number in a list/tuple
RESULT
PROGRAM - 4
4. WAP to input any two tuples and swap their values .
RESULT
PROGRAM - 5
5. WAP to store students’ details like admission number, roll
number, name and percentage in a dictionary and display
information on the basis of admission number.
RESULT
PROGRAM - 6
6. Write a program with a user-defined function with
string as a parameter which replaces all vowels in the
string with ‘*’.
RESULT
PROGRAM - 7
7. Recursively find the factorial of a natural number.
RESULT
PROGRAM - 8
8. Write a recursive code to find the sum of all elements of a list
RESULT
PROGRAM - 9
9. Write a recursive code to compute the nth Fibonacci number.
RESULT
PROGRAM - 10
10.Read a text file line by line and display each word separated by a #.
PROGRAM - 11
11. Create a binary file with roll number, name and marks. Input a roll
number and update details.
RESULT
PROGRAM - 12
12. Remove all the lines that contain the character `a' in a file
and write it to another file
PROGRAM - 13
13. Write a program to perform read and write operation onto a
student.csv file having fields as roll number, name, stream and
percentage.
PROGRAM - 14
14. Program to search the record of a particular student from CSV file on
the basis of inputted name.
PROGRAM - 15
15. Write a random number generator that generates random numbers
between 1 and 6 (simulates a dice).
RESULT
PROGRAM - 16
16. Write a python program to implement a stack using a list data-
structure.
RESULT
PROGRAM – 17
Write a python program to implement searching methods based on user
choice using a list data-structure. (linear & binary)
RESULT