Created
February 18, 2015 21:15
-
-
Save ejmurray/af8ca6ad6dc78a7965be 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
#!/usr/bin/python | |
# encoding: utf-8 | |
""" | |
Description | |
""" | |
__author__ = 'Ernest' | |
__projectName__ = 'untitled' | |
__date__ = '18/02/15' | |
__time__ = '20:47' | |
from datetime import date | |
age = 43 | |
print("I am", age, "years old") | |
age += 10 | |
print("In ten years I will be", age, "years old") | |
payRate = 12.44 | |
hours = 37.5 | |
totalPay = payRate * hours | |
print(totalPay) | |
myDate = date(1972, 2, 11) | |
todayDate = date.today() | |
diff = todayDate - myDate | |
numdays = diff.days | |
numsecs = diff.total_seconds() | |
numyears = numdays // 365 | |
print("You are", numyears, "years old and", numdays, "days and", numsecs, "seconds old") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment