Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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