Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions