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

Class 12 Practical File Computer Science Term 1: Python Programming

The document outlines 15 Python programming tasks to be completed for a computer science practical file. The tasks cover writing functions for arithmetic operations, Fibonacci series, prime numbers, random number generation, recursion, file handling operations like reading, writing, searching and analyzing text.

Uploaded by

Shashwat Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

Class 12 Practical File Computer Science Term 1: Python Programming

The document outlines 15 Python programming tasks to be completed for a computer science practical file. The tasks cover writing functions for arithmetic operations, Fibonacci series, prime numbers, random number generation, recursion, file handling operations like reading, writing, searching and analyzing text.

Uploaded by

Shashwat Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

CLASS 12 PRACTICAL FILE

COMPUTER SCIENCE
TERM 1

PYTHON PROGRAMMING

1. Write python functions to perform the basic arithmetic operations in a menu-driven program.
2. Write a python program using a function to print Fibonacci series up to n numbers.
3. Write a python program using a function to print prime numbers between 11 to 200.
4. Write a function that takes a number n and then returns a randomly generated number having
exactly n digits (not starting with zero).
5. Write a function namely nthRoot() that receives two parameters x and n and returns nth root of x.
6. Recursively find the factorial of a natural number.
7. Write a recursive code to find the sum of all elements of a list.
8. Write a recursive code to compute the nth Fibonacci number.
9. Write a random number generator that generates random numbers between 1 and 6 (simulates a
dice).
10. Read a text file line by line and display each word separated by a #.
11. Read a text file and display the number of vowels/ consonants/uppercase/ lowercase characters in
the file.
12. Create a binary file with name and roll number. Search for a given roll number and display the
name, if not found display appropriate message.
13. Create a binary file with roll number, name and marks. Input a roll number and update the marks.
14. Remove all the lines that contain the character `a' in a file and write it to another file.
15. Take any sample text file and find most commonly occurring word(s).

You might also like