Skip to content

Instantly share code, notes, and snippets.

@ejmurray
Created February 18, 2015 21:15
Show Gist options
  • Save ejmurray/af8ca6ad6dc78a7965be to your computer and use it in GitHub Desktop.
Save ejmurray/af8ca6ad6dc78a7965be to your computer and use it in GitHub Desktop.
#!/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