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

Important Questions of CSV File in Python

Important Questions of CSV File in Python (1)

Uploaded by

nirwalaryan34
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)
73 views

Important Questions of CSV File in Python

Important Questions of CSV File in Python (1)

Uploaded by

nirwalaryan34
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
You are on page 1/ 1

Important Questions of CSV File in Python

Q1. Write a program to read entire data from file data.csv

Q2. Write a program to search the record from “data.csv” according to the admission number input from the user.
Structure of record saved in “data.csv” is Adm_no, Name, Class, Section, Marks

Q3. Write a program to add/insert records in file “data.csv”. Structure of a record is roll number, name and class.

Q4. Write a program to copy the data from “data.csv” to “temp.csv”

Q5. Write a program to read all content of “student.csv” and display records of only those students who scored more
than 80 marks. Records stored in students is in format : Rollno, Name, Marks

Q6. Write a program to display all the records from product.csv whose price is more than 300. Format of record
stored in product.csv is product id, product name, price,.

Q7. Write a program to calculate the sum of all the marks given in the file “marks.csv. Records in “marks.csv” are as
follows :

Rollno, Name, Marks

1, Suman, 67

2, Aman,71

3, Mini, 68

4, Amit, 80

Q8. Write a program to count number of records present in “data.csv” file.

Q9. Write a program to modify the record of a student in a file “data.csv”. Following records are saved in file.

Rollno, Name, Marks

1, Aman, 35

2, Kanak, 1

3, Anuj, 33

4, suman, 25

Q10. Write a program to show the detail of the student who scored the highest marks. Data stored in “Data.csv” is
given below :

Rollno, Name, Marks


1, Aman, 35
2, Kanak, 1
3, Anuj, 33
4, suman, 25

You might also like