Question: Please help me to check the python code as below ,how to fix the errorRecursionError: maximum recursion depth exceeded in comparison explain Why and

Please help me to check the python code as below ,how to fix the error"RecursionError: maximum recursion depth exceeded in comparison" explain "Why " and fix it .Thanks in advance!

def is_leap_year(year): return year%4==0 and(year%100 !=0 or year %400==0)

def leap_year_answer(year):

if is_leap_year(year):

if year<2021 : print('year{}was a leap year'.format (year)) else: print('year{} was not year'.format(year)) if year>2021: print('year{}will be a leap year'.format(year)) else: print('year{}will not bw a leap year'.format(year))

return leap_year_answer(year)

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!