0% found this document useful (0 votes)
14 views

Assignment Computers 2021

The document contains the questions from a computer science term 2 assignment submitted by a student named Herman Sandhu from class 12. There are 21 questions related to file handling, data structures, equations and database connectivity.

Uploaded by

Herman Sandhu
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)
14 views

Assignment Computers 2021

The document contains the questions from a computer science term 2 assignment submitted by a student named Herman Sandhu from class 12. There are 21 questions related to file handling, data structures, equations and database connectivity.

Uploaded by

Herman Sandhu
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/ 16

LITTLE WORLD SCHOOL

Name: Herman Sandhu


Class: XII Sci-A
Roll no.: 26
Subject: Computer Science
Topic: Term-2 assignment
Submitted to: Mr. Abhay Dubey
Q1) Write a program to read the first 10 characters from a text file.

Q2) Write a program to read data using readline() function

Q3) Write a program to write numeric data in a text file


Q4) Write a program to add list items to a file using writelines() method

Q5) Code a program to ask the user to input their name, class along with marks and store it in a text file.
Q6) Program to write structure list in binary file

Q7) Program to read the contents of a binary file

Q8) Write a program to insert/append a record in binary file


Same coding as Q6, and same output as Q6.

Q9) Program to search a record from the binary file on the basis of roll no.
Q10) Program to search the record of particular student from a .csv file

Q11) Program to transfer files into a txt file


Q12) Program to solve the equation of 5x2 + 5y3 + 4z + 6π

Q13) Program to solve the sum of n natural numbers

Q14) Program to check if a year is a leap year or not

Q15) Program to check if a number is a prime number or not

Q16) Program to create a database using connectivity


Q17) Program to view table data using connectivity

Q18) Program to view table fields using connectivity


Q19) Program to select a database using connectivity

Q20) Program to clear records of a table using connectivity

Q21) Program to delete a table using connectivity

You might also like