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

Class 12 CS

This document outlines 15 Python programming assignments for a Computer Science class. The assignments include programs to determine if a number is perfect, check if a number is prime, calculate GCD and LCM, sum a series, search a tuple, find min and max in a list, display student names above a score from a dictionary, separate words in a text file by #, count characters in a text file, remove lines containing 'a' from a file, search and display from a binary file, update marks in a binary file, simulate a dice roll, implement a stack using a list, and search a password in a CSV file.

Uploaded by

Amartya Raj
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)
53 views1 page

Class 12 CS

This document outlines 15 Python programming assignments for a Computer Science class. The assignments include programs to determine if a number is perfect, check if a number is prime, calculate GCD and LCM, sum a series, search a tuple, find min and max in a list, display student names above a score from a dictionary, separate words in a text file by #, count characters in a text file, remove lines containing 'a' from a file, search and display from a binary file, update marks in a binary file, simulate a dice roll, implement a stack using a list, and search a password in a CSV file.

Uploaded by

Amartya Raj
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 XII

SUBJECT – COMPUTER SCIENCE

HOLIDAY HOMEWORK
(Report file: 15 Python programs)

1. Determine whether a number is a perfect number or not.


2. Input a number and check if the number is a prime or composite
number.
3. Compute the greatest common divisor and least common multiple of
two integers.
4. Write a program to input the value of x and n and print the sum of the
following series:

5. Input a tuple of elements, search for a given element in the tuple.


6. Input a list of numbers and find the smallest and largest number from
the list.
7. Create a dictionary with the roll number, name and marks of n students
in a class and display the names of students who have scored marks
above 75.
8. Read a text file line by line and display each word separated by a #.
9. Read a text file and display the number of
vowels/consonants/uppercase/lowercase characters in the file.
10.Remove all the lines that contain the character 'a' in a file and write it to
another file.
11.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.
12.Create a binary file with roll number, name and marks. Input a roll
number and update the marks.
13.Write a random number generator that generates random numbers
between 1 and 6 (simulates a dice).
14.Write a Python program to implement a stack using list.
15.Create a CSV file by entering user-id and password, read and search the
password for given user- id.

You might also like