+ 1
Doubt function def python 3
Hello, here is a "code" that determines which year is leap year. year = input ("write the year") def type_year (year): if year% 4 == 0: print ("the year", year, "is leap") elif year% 400 == 0: print ("the year", year, "is leap") else: print ("year", year, "not leap") The problem I have is that it does not return which year is leap or not, what is wrong with this code?
2 Antworten
+ 2
Hiii bro , condition should be year%4 & year&100 otherwise it will be error ful