Untitled

mail@pastecode.io avatar
unknown
python
a year ago
506 B
0
Indexable
Never
import csv fp=open("employee.csv";'w', newline= ") empwriter=csv.writer(fp) for i in range(5):
ecode-int(input("Enter employee code:")
ename=input("Enter employee name:") edept=input("Enter department name:") esalary=int(input("Enter salary:"
emprec=[ecode,ename,edept,esalary]
empwriter.writerow(emprec)
fp.closel
fp=open("employee.csv",'r')
empreader-csv.reader(fp)
print("The records of employees with salary in 10000 to 15000 :")
for rec in empreader:
if rec[31>='10000' and rec[31<-'15000':
print(rec)