Skip to content

Instantly share code, notes, and snippets.

View isaiahdbarry's full-sized avatar

Isaiah isaiahdbarry

  • United States
View GitHub Profile
@isaiahdbarry
isaiahdbarry / clockchallenge.py
Created July 9, 2017 20:42
Solution to /r/dailyprogrammer challenge #321 (Python 3)
from num2words import num2words
def timeAsString(time):
time = time.split(sep=":")
if int(time[0]) < 12:
timeofday = "AM"
else:
timeofday = "PM"
time[0] = int(time[0]) - 12
hour = int(time[0])