Advertisement
Korobka887

Матан

Feb 1st, 2022 (edited)
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.65 KB | None | 0 0
  1. from random import randint
  2.  
  3. def reshat_matan(intoxication):
  4.     intoxication = intoxication if intoxication < 50 else 50
  5.     return True if randint(0, 120 - intoxication // 10) > 50 else False
  6.  
  7.  
  8. intoxication = randint(0, 15)
  9. intoxication += 10 if intoxication < 12 else 0
  10. count_task = 0
  11. while intoxication < 100:
  12.     if reshat_matan(intoxication):
  13.         count_task += 1
  14.         print('Задача {} решена!'.format(count_task))
  15.     else:
  16.         intoxication += randint(0, 25)
  17.  
  18.  
  19. if count_task >= 18:
  20.     print('Матан решён')
  21. else:
  22.     print('Вы напились. Поздравляю, у вас цирроз печени')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement