Question: This is python 2 question def is_leap year (year) : input: a year output: True if it is a leap year False otherwise ####################### #

This is python 2 question

This is python 2 question def is_leap year (year) : input: a

def is_leap year (year) : input: a year output: True if it is a leap year False otherwise ####################### # Fill your code here, use as many new lines you like. Delete this l # keep the indent! return True # you can delete/change this line and write new if name == " main ": print("Please enter a year") s = raw_input() try: a = int(s) if is_leap_year (a): print("This is a leap year") else: print("this is not a leap year") except: print ("Not an integer") Expected outcome: >> python q3.py Please enter a year >> 2019 this is not a leap year >> >> python 93.py Please enter a year >> 2000 this is not a leap year >> python q3.py Please enter a year >> 2020 This is a leap year

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!