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
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