Question: what is the output:try: user_age = int(input()) if user_age < 0: raise ValueError('Invalid age') # Source: https://www.heart.org/en/healthy-living/fitness avg_max_heart_rate = 220 - user_age print(f'Avg: {avg_max_heart_rate}') except
what is the output:try: user_age = int(input()) if user_age < 0: raise ValueError('Invalid age') # Source: https://www.heart.org/en/healthy-living/fitness avg_max_heart_rate = 220 - user_age print(f'Avg: {avg_max_heart_rate}') except ValueError as excpt: print(f'Error: {excpt}') Input -40
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
