A leap year occurs once every four years to account for the extra time it takes for the earth to complete its orbit around the…