'''
Created on Sep 8, 2011

@author: rodger
'''
def convertToSeconds(min, sec):
    return min * 60 + sec

def addAndPrintTime(seconds1, seconds2):
    time = seconds1 + seconds2
    print "Total seconds of both times = " + str(time)
    hours = time/(60 * 60)
    minutes = (time % 3600) / 60 
    seconds = time % 60
    totalSecondsCalculated = (hours * 3600) + (minutes * 60) + seconds 
    print "Total seconds calculated = " + str(totalSecondsCalculated)
    print "Hours are " + str(hours)
    print "Minutes are " + str(minutes)
    print "Seconds are " + str(seconds)
    

min1 = int(raw_input("enter number of minutes: "))
sec1 = int(raw_input("enter number of seconds: "))
min2 = int(raw_input("enter number of minutes: "))
sec2 = int(raw_input("enter number of seconds: "))


time1 = convertToSeconds(min1, sec1)
print "total seconds for first time = " + str(time1)
time2 = convertToSeconds(min2, sec2)
print "total seconds for second time = " + str(time2)
addAndPrintTime(time1, time2)
print
print "Do it again...."


convertToSeconds(min1, sec1)
convertToSeconds(min2, sec2)
addAndPrintTime()




