+ 1
Leap Year?
x = int(input()) def leap_year(x): if x % 400 == 0: print("Is big leap year") if x % 100 == 0: print("is not leap year") elif x % 4 == 0: print("Is every 4") leap_year(x) Input: 1990 Output: no output Okay, getting closer. Any idea who to tie the if statements together?
4 Respostas
+ 11
#leap.py
y=int(input("Enter year:"))
if y%4!=0:
print("Not a leap year")
elif y%100!=0:
print("This is a leap year")
elif y%400!=0:
print("This is not a leap year")
else:
print("This is a big leap year")
0
year = int(input())
#your code goes here
if year%400==0:
print('This a leap year')
elif year%4==0 and year%100!=0:
print('This is a leap year')
else:
print('This is a not a leap year')
0
year = int(input())
if year % 4 != 0:
print("Not a leap year")
elif year % 100 != 0:
print("Leap year")
elif year % 400 ==0:
print("Leap year")
else:
print("Not a leap year")
0
year = int(input())
if(year%4 == 0):
if(year%100 == 0):
if(year%400 == 0):
print("Leap year")
else:
print("Not a leap year")
else:
print("Leap year")
else:
print ("Not a leap year")