0% found this document useful (0 votes)
1 views2 pages

Class 12 Computer Science

The document is a homework assignment for Class 12 Computer Science for the academic year 2026-27. It includes various sections with questions ranging from very short answers to application-based tasks, focusing on data handling, file operations, and function usage in Python. Students are required to write programs and functions to demonstrate their understanding of these concepts.

Uploaded by

Guneshwar Singh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views2 pages

Class 12 Computer Science

The document is a homework assignment for Class 12 Computer Science for the academic year 2026-27. It includes various sections with questions ranging from very short answers to application-based tasks, focusing on data handling, file operations, and function usage in Python. Students are required to write programs and functions to demonstrate their understanding of these concepts.

Uploaded by

Guneshwar Singh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Class 12 Computer Science

Homework Assignment (2026-27)

Section A: Very Short Answer

1. What is data handling in Python?


2. Name any two file modes used in Python.
3. What is the purpose of a function in Python?
4. Name any two built-in functions in Python.

Section B: Short Answer

5. What is the difference between text file and binary file?


6. Write a program to read a file and display its contents.
7. Write a function to find the sum of all even numbers between 1 and n.
8. Explain default arguments with a suitable example.

Section C: Long Answer

9. Write a Python program to:


o Create a text file
o Write data into it
o Read and display the contents
10. Write a Python program using functions to:

• Input a number
• Check whether it is an Palindrome number

Section D: Case Study Based

11. A company stores employee details in a file. Write a program to:

• Add new employee records


• Display all records from the file

Section E: Application Based

12. A school is developing a system to calculate student grades. Write functions to:
• Accept marks of 5 subjects
• Calculate total and percentage
• Display grade based on percentage:
o ≥ 90 → A
o ≥ 75 → B
o ≥ 50 → C
o < 50 → Fail

NOTE- ALL WORK SHOULD BE WRITTEN IN


YOUR NOTEBOOK

You might also like