import csv POS =[] with open(‘Productivity Approvals.csv’,…
Question Answered step-by-step import csv POS =[] with open(‘Productivity Approvals.csv’,… import csvPOS =[]with open(‘Productivity Approvals.csv’, newline=”)as csvfile: my_reader = csv.reader(csvfile, delimiter=’,’) for x in my_reader: POS.append(x)while True: cname=input(‘Enter Full Name here: or Q to quit:’) if cname ==’Q’: break import datetime input_date_in_format = input(‘Input Date in DD/MM/YYYY format:’) input_year, input_month, input_day = map(int, input_date_in_format.split(‘/’)) date_entered = datetime.date(input_year, input_month, input_day) if cname ==’Q’: break brandclass =[0,0] hdr=0 for x in POS: if hdr == 0: hdr = 1 continue elif x[10] == cname and x[13] == date_entered: brandclass[0] = brandclass[0] + int(x[14]) brandclass[1] = brandclass[1] + 1 print(‘Total Vouchers:’ ,brandclass[1], ‘Number of days:’, (brandclass[0]/brandclass[1]))Hello I am getting closer however I am still wondering what I am doing wrong please advise! Thank you in advance!Image transcription textInput Date in DD/MM/YYYYformat:27/04/2022 Traceback(most recent call last): … Show more… Show more Computer Science Engineering & Technology Python Programming CS MISC Share QuestionEmailCopy link Comments (0)


