Advertisement
serjah1

hora

Oct 31st, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. class hora:
  2.     pass
  3.  
  4. def incremento(self, segundos):
  5.     self.segundos = segundos + self.segundos
  6.  
  7.     while self.segundos >= 60:
  8.         self.segundos = self.segundos - 60
  9.         self.minutos = self.minutos + 1
  10.  
  11.     while self.minutos >= 60:
  12.         self.minutos = self.minutos - 60
  13.         self.horas = self.horas + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement