Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. class Test(object):
  2. def __init__(self, startTime, duration, location):
  3. self.startHour = float(str(startTime)[:2])*10/24
  4. self.startMin = float(str(startTime)[2:])*1/60
  5. self.durHour = float(str(duration)[:2])
  6. self.durMin = float(str(duration)[2:])
  7. self.location = location
  8. def displayStart(self):
  9. print self.startHour
  10. print self.startMin
  11. print "Event goes from " + str(self.startHour * 2.4) + ":" + str(self.startMin*60)
  12.  
  13. i = Test(startTime=1200,duration=100,location="Germany")
  14. i.displayStart()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement