Answered step by step
Verified Expert Solution
Question
1 Approved Answer
confused on function on python, all the lines below 33 are given LeapYear.py Submit 1 #A year is considered a leap year if it abides
confused on function on python, all the lines below 33 are given
LeapYear.py Submit 1 #A year is considered a leap year if it abides by the 2 #following rules: Console o 3# displayed 4 # -Every 4th year IS a leap year, EXCEPT 5 # -Every 100th year is NOT a leap year, EXCEPT 6 # -Every 400th year IS a leap year. 7# 8 #This starts at year 0. For example: 9# 10 # -1993 is not a leap year because it is not a multiple of 4. 11 # -1996 is a leap year because it is a multiple of 4. 12 # -1900 is not a leap year because it is a multiple of 100, 13 # even though it is a multiple of 4 14 # -2000 is a leap year because it is a multiple of 400, 15 # even though it is a multiple of 100. 16 # 17 #1 rite a function called is leap year. is leap year should 18 #take one parameter: year, an integer. It should return the 19 #boolean True if that year is a leap year, the boolean False 20 #if it is not. 21 23#Write your function here! 24 def is_leap_year (1993,1996,1900,2000): 25 26 27 #Below are some lines of code that will test your function. 28 #You can change the value of the variable(s) to test your 29#function with different inputs. 30 # 31 #If your function works correctly, this will originally 32#print False, True, False, and True, each preceded by the 33 #label "[year] is a leap year:". 34 print("1993 is a leap year:", is leap year (1993) 35 print("1996 is a leap year:", is leap year (1996) 36 print("1900 is a leap year:", is leap year (1900) 37 print( 2000 is a leap year:", is leap year(2000)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started