def multiplo (dividendo, divisore):
    if dividendo%divisore==0:
        return True 
    else:
        return False

def leapyear (year):
    if multiplo (year, 100)==True:
        if multiplo (year, 400)==True:
            return True
        else:
            return False
    else:
        if multiplo (year, 4)==True:
            return True
        else:
            return False
while ok==False
    print ("inserire un anno")
    year=int (input) 


if leapyear (year)==True
    print ("anno bisestile")
else:
    print ("anno non bisestile")

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: