Last active
December 19, 2017 00:37
-
-
Save BlogBlocks/8fc267a8ca26da3ec96afc8c34334d4e 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/local/bin/python | |
| """ | |
| Converts a date into a fraction of a year | |
| Usage: Takes two arguments month and day. | |
| python dateTodec.py 2 22 | |
| """ | |
| from __future__ import division | |
| import sys | |
| import math | |
| import sys, getopt | |
| MonthNum = int(sys.argv[1]) | |
| DateI = int(sys.argv[2]) | |
| """ | |
| from PIL import Image | |
| MonthNum = sys.argv[1] | |
| DateI = sys.argv[2] | |
| x=int(MonthNum) | |
| y=int(DateI) | |
| print x, y | |
| #!/usr/bin/python | |
| import sys | |
| MonthNum = int(sys.argv[1]) | |
| DateI = int(sys.argv[2]) | |
| """ | |
| mn = (MonthNum-1)*30.14 | |
| r = mn+DateI-1 | |
| op = 365.25/r-365.25 | |
| print "fraction: ",r/365.25 | |
| print "\n" | |
| print "Notice the change format of print after being turned into an object" | |
| fraction = "fraction: ",r/365.25 | |
| print fraction | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
made public