Guest User

Untitled

a guest
Jan 23rd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. def compute(first, second):
  2. if first > 10:
  3. return second * 2
  4. return second / 2
  5.  
  6. def decide(start):
  7. seed = get_seed(start)
  8. attempt = 10
  9. while 1:
  10. try:
  11. first = get_first(seed)
  12. second = get_second(seed)
  13. third = get_third(seed)
  14.  
  15. return compute(first, second, third) + 100
  16. except Exception, e:
  17. if attempt < 1:
  18. raise e
  19. attempt -= 1
Add Comment
Please, Sign In to add comment