Question: PYTHON Create ppl_in_class function Takes info and returns each academic class and the people in them As shown in the last line where it checks
PYTHON
Create ppl_in_class function
Takes info and returns each academic class and the people in them
As shown in the last line where it checks

1 from collections import defaultdict 2 3 def ppl_in_class(info str:f (str,str))) -[(str, [str])]: 4. return 6 if name'main' 7 def check_ans (ans, right_ans): if (ans -- right_ans): 8 9 10 print( 'RIGHT Answer!) else: print( 'WRONG Answer!) print(' print('right answer is -', right_ans) input answer wasans) 12 13 14 s 16 info { 'B10-100': {("John', 'A'), ('Danny.', 'C'), (Konu', 'B')), = PHYS-1": ('John', B'), ('Angela', 'A')>> 18 19 20 check_ans (ans, [('PHYS-1', [ 'Angela', 'John ']), ( BIO-100', ['John', 'Konn print(argument-,info) ans ppl-in-class(info) print( ' answer', ans) Danoy)])
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
