Open 23bca261 opened 2 weeks ago
bhai agar error hoto screenshot upload krde taaki jyada understand ho kya error he ya fir doubt kaha pe he uska..
student ko per block count me kaise kar na he vo samaj nahi aa raha hai
table me number of student count per block kaise kare
mera program:Create csv file exam(sid,sname, seatno, blocknumber) using writer object with 10 records. Read this file and count students per block
First open file in read mode " r " and then you can count students per block by using " for loop ".
Ex:
block_count = { } with open("student.csv","r") as f: reader = csv.reader(f) next(reader)
for row in reader:
block = row[3]
if block in block_count:
block_count[block] += 1
else:
block_count[block] = 1
@23bca261
Okk , I will run this program in pc.
@23bca274
table me number of student count per block kaise kare
mera program:Create csv file exam(sid,sname, seatno, blocknumber) using writer object with 10 records. Read this file and count students per block