Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Test(object):
- def __init__(self, startTime, duration, location):
- self.startHour = float(str(startTime)[:2])*10/24
- self.startMin = float(str(startTime)[2:])*1/60
- self.durHour = float(str(duration)[:2])
- self.durMin = float(str(duration)[2:])
- self.location = location
- def displayStart(self):
- print self.startHour
- print self.startMin
- print "Event goes from " + str(self.startHour * 2.4) + ":" + str(self.startMin*60)
- i = Test(startTime=1200,duration=100,location="Germany")
- i.displayStart()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement