Question: Part (c) (2 MARKS] Consider the following module: from typing import List def f3(1st: List[int]) > float: n-0 total - 0 for item in lst:

 Part (c) (2 MARKS] Consider the following module: from typing import

Part (c) (2 MARKS] Consider the following module: from typing import List def f3(1st: List[int]) > float: n-0 total - 0 for item in lst: if item % 2 - 0: total + item n+ 1 return total / n def f2(1st: List[int]) -> float: return f3(1st) def f1(1st: List[int]) -> float: try: return f2(1st) except ZeroDivisionError: print('Ouch!) return 0.0 if __name__ - '__main__': print(f1([3, 21, 85, 11, 7])) 1. How many stack frames are on the call stack, including the frame for __main.., when an error is raised? 2. When the error is raised, how many stack frames are popped off the stack before "Ouch!" is printed

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!