0
Leap Year?
x = int(input() def leap_year(x): if x % 4 == 0: print(x) else: print("nope") leap_year(x) Keep getting an error message on line 2? It says error on "def"? I'm defining an input number which, when divided by 4 % == 0: so not sure why error? Any help appreciated:).
5 Respostas
+ 1
Thanks Swim!
0
Tanks, Swim.
Now they want it in boleen logic? Am I on the right track? Tested out okay.
x = int(input())
print((x) % 4 == 0 and (x) % 100 != 0 and (x) % 400 == 0)
0
Changed name on stuff to match their request and everything went haywire:(. says shntax error on line 2? Any ideas what?
year = int(raw_input())
def(raw_input):
print ((year) % 4 == 0 or (year) % 100 != 0 or (year) % 400 != 0)