Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

SAINIK SCHOOL AMARAVATHINAGAR

SUMMER VACATION TASK May – June 2023


SUBJECT: COMPUTER SCIENCE

Submitted By
Mr. Praveen MJ
PGT (CS)
SAINIK SCHOOL AMARAVATHINAGAR
SUMMER VACATION TASK May – June 2023
CLASS XII
FILE HANLDING PROGRAMS
(TEXT FILES)
01. Write a Python program to read an entire text file. 
02. Write a Python program to read first n lines of a file. 
03. Write a Python program to append text to a file and display the text. 
04. Write a Python program to read last n lines of a file. 
05. Write a Python program to read a file line by line and store it into a list. 
06. Write a Python program to read a file line by line store it into a variable. 
07. Write a Python program to read a file line by line store it into an array. 
08. Write a python program to find the longest words. 
09. Write a Python program to count the number of lines in a text file. 
10. Write a Python program to count the frequency of words in a file. 
11. Write a Python program to get the file size of a plain file. 
12. Write a Python program to write a list to a file. 
13. Write a Python program to copy the contents of a file to another file . 
14. Write a Python program to combine each line from first file with the corresponding line in second file. 
15. Write a Python program to read a random line from a file. 
16. Write a Python program to assess if a file is closed or not. 
17. Write a Python program to remove newline characters from a file. 
18. Write a Python program that takes a text file as input and returns the number of words of a given text file. 
Note: Some words can be separated by a comma with no space.
19. Write a Python program to extract characters from various text files and puts them into a list. 
20. Write a Python program to generate 26 text files named A.txt, B.txt, and so on up to Z.txt. 
21. Write a Python program to create a file where all letters of English alphabet are listed by specified number of letters on each
line.
22. Write a program to read the text file “abc.txt” and return the 10 first characters of the file
23. Write a program to read 1st line from “abc.txt” and display on screen.
24. Modify the above program and read entire file using readline function
25. Modify the above program by adding end parameter in print statement
26. Write a program in Python to read lines from a text file NOTES.TXT, count and print those lines, which are ending with ‘.’ or
‘,’ For eg. if the file contains : In Python, a file operation takes place in the following order:
(i) Open a file. (ii) Read or write, (iii) Close the file.
output : count=3
FILE HANLDING PROGRAMS
(BINARY FILES)
1 Write a program to create a list L and store it to binary file “test”
2 Write a program to create a list L and store it to binary file “test”
3 Write a program to create pickle file “test” where
(i) write data to pickle file using Dictionary. (ii) read the file and display the contents
4. Write a program to create pickle file “test” where
(i) write data to pickle file using Dictionary. (ii) read the file and display the contents
5.Write program to read the above created ‘student’ file and show the contents of file in the following format roll name total
6. Write a program to search for the details (name,total) of student which roll no is read during the execution of the program.
7. Write a program to update the file with a new value of Name. The values of name and rollno are read during the execution of
the program.
8. Write a program to delete record from pickle file “student”. The value of rollno is taken from user.
9. Write a menu driven program to add, delete, display, modify records in pickle files “emp” using dictionary and functions.
Fields of employee file are :
empno :Empolyee number
name : Name of Employee
salary : Salary of Employee
Bonus : 10% of salary
10. Write a function in Python to search and display details of all those students using display(L) function, whose stream is
“HUMANITIES” from pickled file “Student.dat”. Assuming the pickled file is containing the following
fields :RNO,Name,Stream,Per
11. write a method store_data(record) in python to write the content in a pickled file member.dat.
Considering the following definition of functions, write a method inPython to search and display the content in a pickled file
FACTORY.DAT,where FCTID is matching with the value ‘105’
12. A binary file “STUDENT.DAT” has structure (admission_number, Name, Percentage). Write a function countrec() in Python
that would read contents of the file “STUDENT.DAT” and display the details of those students whose percentage is above 75.
Also display number of students scoring above 75%
A binary file “Book.dat” has structure [BookNo, Book_Name, Author, Price].
(i) Write a user defined function CreateFile() to input data for a record and add to Book.dat .
(ii) Write a function CountRec(Author) in Python which accepts the Author name as parameter and count and Goyal return
number of books by the given Author are stored in the binary file “Book.dat”
13. Write a definition for function Billing() in Python to read each record of a pickled file STOCK.DAT, and display the Total Price
of all the records in the file. Assume that the file STOCK.DAT is containing following fields SName and Price
A pickled file ELECTION.DAT contains records stored the following fields :Name,Count Write the definition for function
LowCount() in Python, which reads every record from ELECTION.DAT and displays every such Name whose Count is less than 10
14. Write a method/function MERIT() in python to search and display all the content from a pickled file STUDENT. DAT, where
Marks of STUDENT is more than 75.File containing Name and Marks fields.
15. Write a method/function MERIT() in python to search and display all the content from a pickled file STUDENT. DAT, where
Marks of STUDENT is more than 75.File containing Name and Marks fields.
16. Write a method/function SPLDOCS() in python to search and display all the content from a pickled file DOCS. DAT, where
Specialisation of DOCTORS is “CARDIOLOGY”
17. Amritya Seth is a programmer, who has recently been given a task to write a python code to perform the following binary
file operations with the help of two user defined functions/modules
(a) AddStudents() to create a binary file called STUDENT.DAT containing student information – roll number, name and marks
(out of 100) of each student.
(b) GetStudents() to display the name and percentage of those students who have a percentage greater than 75. In case there is
no student having percentage > 75 the function displays an appropriate message. The function should also display the average
percent.

CBSE QUESTION PAPERS

Solve the last five years CBSE Question papers (covered Chapters – Python Revision
Tour 1 & 2, Functions and File Handling Chapters)

 PREPARE PRACTICAL FILE


 PREPARE PROJECT FILE
SAINIK SCHOOL AMARAVATHINAGAR
SUMMER VACATION TASK May – June 2023
CLASS XI
1. What is algorithm?
2. Give the definition of flow chart.
3. What is program?
4. What is compiler?
5. What is assembler?
6. What is interpreter?
7. List the symbols used for flowchart
8. What are the different programming languages?
9. What is lower level language? Enlist LLL.
10. Name the software required to make a computer functional. Write down its two
primary services.
11. Explain Mobile architecture with neat diagram
12. Convert the binary number 11001 to decimal.
13. Convert the decimal number 45 to binary
14. Convert the hexadecimal number B2 to binary:
15. Convert the binary number 11011 to hexadecimal
16. Write a note on ASCII
17. Write a note on Unicode
18. What is Boolean algebra?
19. Define Gate?
20. Simplifying the following with the help of Boolean algebra Rules:
21. (i) AB +AC +ABC
22. (ii) AB + A( B + C) + AB +C
23. (iii) A BC + AC + ABC + BC + AC
24. (iv) C + BC + AC +A
25. State & Verify De Morgan's Law by using truth table and algebraically.
26. State and verify distributive law.
27. Draw a logic diagram for the following expression:
28. (a) ab+b’c+c’a’
29. (b) (a+b).(a+b’)
30. Explain basic gates with its symbol and truth table.
31. Explain distributive laws
32. Explain Associate law
33. What is the principle of duality?
34. Explain Indempotence (Identity) Law
35. Explain Absorption (Redundance) Law
36. Explain Commutative Law
37. Explain Distributive Law
38. Write a note on applications of logic gates in real life.
39. What is Boolean algebra?
40. Define Gate?
41. Simplifying the following with the help of Boolean algebra Rules:
42. (i) AB +AC +ABC
43. (ii) AB + A( B + C) + AB +C
44. (iii) A BC + AC + ABC + BC + AC
45. (iv) C + BC + AC +A
46. State & Verify De Morgan's Law by using truth table and algebraically.
47. State and verify distributive law.
48. Draw a logic diagram for the following expression:
49. (a) ab+b’c+c’a’
50. (b) (a+b).(a+b’)
51. Explain basic gates with its symbol and truth table.
52. Explain distributive laws
53. Explain Associate law
54. What is the principle of duality?
55. Explain Indempotence (Identity) Law
56. Explain Absorption (Redundance) Law
57. Explain Commutative Law
58. Explain Distributive Law
59. Write a note on applications of logic gates in real life..
 PRACTICAL FILE PREPERATION
 PROJECT WORK
CHAPTERWISE PYTHON PROGRAMS:
CH: GETTING STARTED WITH PYTHON
CH: PYTHON FUNDAMENTALS
CH: DATA HANDLING
 SIMPLE PROGRAMS -10
 AVG PROGRAMS -10
 ABOVE AVG -10
 HOTS -05
SAINIK SCHOOL AMARAVATHINAGAR
SUMMER VACATION TASK May – June 2023
CLASS X
1. EXPLAIN ABOUT SGML – STANDARD GENERALIZED MARKUP LANGUAGE
2. EXPLAIN ABOUT XML – EXTENSIBLE MARKUP LANGUAGE
3. LIST THE STEPS FUNCTIONS OF HTTP PROTOCOL.
4. WHAT IS DOMAIN & MENTION DIFFERENT TYPES OF DOMAINS?
5. WRITE THE FORMAT OF HTML PROGRAM
6. MENTION SOME TEXT FORMATTING TAGS
7. EXPLAIN ABOUT LIST TAG.
8. EXPLAIN THE ATTRIBUTES OF TABLE TAG WITH AN EXAMPLE
9. EXPLAIN ABOUT HTML FORM TAG WITH ITS ATTRIBUTES.
10. HOW DO YOU USE A PICTURE AS THE BACKGROUND IN HTML?
11. HOW DO YOU CHANGE THE COLOR OF BACKGROUND OR TEXT IN
HTML?
12. WHAT IS HTML?
13. HOW DO YOU ADD MUSIC TO A WEB PAGE?
14. HOW DO YOU MAKE A NEW PARAGRAPH IN HTML?
15. HOW DO YOU MAKE TEXT SHOW AS BOLD?
16. HOW DO I MAKE TEXT SHOW IN ITALICS?
17. WRITE THE HTML TO CREATE THE ORDERED LIST.
18. WRITE THE HTML TO CREATE THE UNORDERED LIST
19. HOW WOULD YOU MAKE ALL TEXT ON A PAGE GREEN AND A LITTLE
LARGER THAN NORMAL, BUT MAKE ALL HEADINGS YELLOW?
20. HOW WOULD YOU INSERT A SINGLE WORD AND PUT A SQUARE
BULLET IN FRONT OF IT?
SAINIK SCHOOL AMARAVATHINAGAR
SUMMER VACATION TASK May – June 2023
CLASS VIII
1. Explain the characteristics of computers
2. Draw a neat block diagram of computer and explain its parts
3. What are the drawbacks of computer system?
4. What is software?
5. Explain in detail the various types of software
6. What is memory and how memory is measured?
7. List down the various memory measurements
8. What is primary memory of computer?
9. Explain the various types of primary memory of computer
10. What is secondary memory?
11. Explain the hard disk with its neat diagram
12. What is compact disk? Explain
13. What is DVD?
14. What is Bluetooth?
15. What is Wi-Fi?
16. Prepare a project on python project should include followings
 Introduction
 History of python
 Applications of python
 5 simple programs
SAINIK SCHOOL AMARAVATHINAGAR
SUMMER VACATION TASK May – June 2023
CLASS VII
1. Prepare chart for any one of the following using chart paper
a) Facts on Windows OS
b) Draw a computer and explain its parts
c) 25 Most popular Keyboard short cuts in windows
d) Networking Equipment

2. Prepare a project on use of internet project should include followings


 About internet
 History of internet
 Applications of internet

You might also like