Guest User

Untitled

a guest
Jun 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. #1.1-1.10
  2. if 0 <= self.total < 2: return ("1","1")
  3. if 2 <= self.total < 4: return ("1","2")
  4. if 4 <= self.total < 6: return ("1","3")
  5. if 6 <= self.total < 8: return ("1","4")
  6. if 8 <= self.total < 10: return ("1","5")
  7. if 10 <= self.total < 12: return ("1","6")
  8. if 12 <= self.total < 14: return ("1","7")
  9. if 14 <= self.total < 16: return ("1","8")
  10. if 16 <= self.total < 18: return ("1","9")
  11. if 18 <= self.total < 20: return ("1","10")
  12.  
  13. #2.1-2.10
  14. if 20 <= self.total < 40:
  15. return (u"2", unicode(int(round( ((self.total-20) / 2) + 0.5 ))).zfill(2) )
  16.  
  17. #3.1-3.10
  18. if 40 <= self.total < 80:
  19. return (u"3", unicode(int(round( ((self.total - 40) / 4) + 0.5 ))).zfill(2) )
  20.  
  21. #4.1-4.20
  22. if 80 <= self.total < 160:
  23. return (u"4", unicode(int(round( ((self.total - 80) / 4) + 0.5 ))).zfill(2) )
  24.  
  25. #5.1-5.20
  26. if 160 <= self.total < 240:
  27. return (u"5", unicode(int(round( ((self.total - 160) / 4) + 0.5 ))).zfill(2) )
  28.  
  29. #6.1-6.20
  30. if 240 <= self.total < 320:
  31. return (u"6", unicode(int(round( ((self.total - 240) / 4) + 0.5 ))).zfill(2) )
  32.  
  33. #7.1-7.20
  34. if 320 <= self.total < 4000:
  35. return (u"7", unicode(int(round( ((self.total - 320) / 80) + 0.5 ))).zfill(2) )
  36.  
  37. return (u'7',u'20') # highest level
Add Comment
Please, Sign In to add comment