Created
March 5, 2020 01:24
-
-
Save afaqk9394/aa67d2181cd110585434a4496ad926db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pythoncode1.py (11 lines) | |
from datetime import date | |
def diff_dates(date1, date2): | |
return abs(date2-date1).days | |
def main(): | |
d1 = date(2013,1,1) | |
d2 = date(2013,9,13) | |
result1 = diff_dates(d2, d1) | |
print '{} days between {} and {}'.format(result1, d1, d2) | |
print ("You just got one step closer to passing the Cisco DevNet Associate Exam!") | |
Pythoncode2.py (8 lines) | |
def diff_dates(date1, date2): | |
return abs(date2-date1).days | |
def main(): | |
d1 = date(2013,1,1) | |
d2 = date(2013,9,13) | |
result1 = diff_dates(d2, d1) | |
print '{} days between {} and {}'.format(result1, d1, d2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment