12311k

Untitled

Jan 15th, 2020
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. import pandas as pd
  2.  
  3. n_users = 50000
  4. revenue_per_user = 10
  5.  
  6. var_costs = pd.Series({
  7. 'marketing': 200000,
  8. 'servers': 200000
  9. })
  10.  
  11. fixed_costs = pd.Series({
  12. 'salaries': 300000,
  13. 'rent': 150000
  14. })
  15.  
  16. revenue = n_users * revenue_per_user
  17. total_costs = var_costs.sum() + fixed_costs.sum()
  18.  
  19. one_unit_var_costs = var_costs / n_users
  20.  
  21. def unit_economics(marketing):
  22. n_users = marketing / one_unit_var_costs['marketing']
  23. revenue = revenue_per_user * n_users
  24. var_costs = one_unit_var_costs * n_users
  25. return revenue - sum(var_costs) - sum(fixed_costs)
  26.  
  27. for m in range(300000, 1500000, 100000):
  28. print('Прибыль/убыток: {} при бюджете в {}'.format(unit_economics(m), m))
Advertisement
Add Comment
Please, Sign In to add comment