The program prompts the user to enter a student's admission number and searches a CSV file called "records.txt" containing student records with fields for name, roll number, admission number, and class. It loops through the CSV file, compares the admission number to the input, and prints the matching student's details if found or a "no details found" message if not found.
The program prompts the user to enter a student's admission number and searches a CSV file called "records.txt" containing student records with fields for name, roll number, admission number, and class. It loops through the CSV file, compares the admission number to the input, and prints the matching student's details if found or a "no details found" message if not found.
The program prompts the user to enter a student's admission number and searches a CSV file called "records.txt" containing student records with fields for name, roll number, admission number, and class. It loops through the CSV file, compares the admission number to the input, and prints the matching student's details if found or a "no details found" message if not found.
WAP to enter admission no. and search details student
in a CSV file“records.txt”containing list objects and having structure as [name,rno,admno,class] import csv f=open("records.csv","r") a=csv.reader(f) x=input("enter admission no. of student") for i in a: if i[2]==x: print("data found") print("student name:",i[0]) print("student rno:",i[1]) print("student admno:",i[2]) print("student class:",i[3]) break else: print("no details found") break OUTPUT