Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 yearStep 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