Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started