Question: Need to create read_file function that satisfies the check INPUT FILE: sem1.txt PHYS-1:Angela,A:John,B BIO-100:John,A:Konny,B:Danny,C 1 from collections import defaultdict 2 read-file(file return 36 , def

Need to create read_file function that satisfies the check

Need to create read_file function that satisfies the check INPUT FILE: sem1.txt

INPUT FILE:

sem1.txt

PHYS-1:Angela,A:John,B BIO-100:John,A:Konny,B:Danny,C

1 from collections import defaultdict 2 read-file(file return 36 , def 4. open) {str:{(str,str))): : -> 6 if name-' main def check ans (ans, right_ans): if (ans -right_ans): 8 9 10 print( 'RIGHT Answer!) else: print( 'WRONG Answer!') print(i print(' right answer is-, right_ans) input answer wasans) 12 13 14 15 16 17 print( 'file sem1EXt') ans = read-file (open( 'sem1..txt')) print('answerans) 18 check_ans (answer, 'ICS-31John', 'A Danny', "C' Konny, 'B') 19 PHYS-1": ('John', 'B'), ( 'Angela', 'A')>>)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!