Advertisement
Appendko

Untitled

Oct 31st, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. for data in record_date_store:
  2.     user = data.user
  3.     amount = data.amount
  4.     ticket = data.ticket
  5.     user.got_A = False
  6.     user.got_B = False
  7.     user.got_C = False
  8.    
  9.     if (amount < 36000) and (ticket > 0) and (user.got_C == True):
  10.         amount = amount - 36000
  11.         ticket = ticket - 1
  12.         user.got_C = True
  13.        
  14.     if (amount < 12000) and (ticket > 0) and (user.got_B == True):
  15.         amount = amount - 12000
  16.         ticket = ticket - 1
  17.         user.got_B = True
  18.        
  19.     if (amount < 8000) and (ticket > 0) and (user.got_A == True):
  20.         amount = amount - 8000
  21.         ticket = ticket - 1
  22.         user.got_A = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement