Important Questions of CSV File in Python
Q1. Write a program to read entire data from file [Link]
Q2. Write a program to search the record from “[Link]” according to the admission number input from the user.
Structure of record saved in “[Link]” is Adm_no, Name, Class, Section, Marks
Q3. Write a program to add/insert records in file “[Link]”. Structure of a record is roll number, name and class.
Q4. Write a program to copy the data from “[Link]” to “[Link]”
Q5. Write a program to read all content of “[Link]” 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 [Link] whose price is more than 300. Format of record
stored in [Link] is product id, product name, price,.
Q7. Write a program to calculate the sum of all the marks given in the file “[Link]. Records in “[Link]” 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 “[Link]” file.
Q9. Write a program to modify the record of a student in a file “[Link]”. 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 “[Link]” is
given below :
Rollno, Name, Marks
1, Aman, 35
2, Kanak, 1
3, Anuj, 33
4, suman, 25