SHARE
TWEET

Untitled

a guest Oct 16th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. total_web = 10
  2. total_speakers = 7539
  3.  
  4. chinese_speakers = 1107
  5. chinese_web_part = 0.017
  6.  
  7. english_speakers = 1121
  8. english_web_part = 0.539
  9.  
  10. russian_speakers = 264.3
  11. russian_web_part = 0.061
  12.  
  13. chinese_speakers_part = chinese_speakers / total_speakers
  14. chinese_web_sites = chinese_web_part * total_web
  15. chinese_index = 1000 * chinese_web_sites / chinese_speakers
  16. print('--- Китайский язык ---')
  17. print('Доля говорящих на языке: {:.1%}'.format(chinese_speakers_part))
  18. print('Доля сайтов с языком: {:.1%}'.format(chinese_web_part))
  19. print('Индекс проникновения в интернет:{:.2f}' . format(chinese_index))
  20. print()
  21.  
  22. english_speakers_part = english_speakers / total_speakers
  23. english_web_sites = english_web_part * total_web
  24. english_index = 1000 * english_web_sites / english_speakers
  25. print('--- Английский язык ---')
  26. print('Доля говорящих на языке: {:.1%}'.format(english_speakers_part))
  27. print('Доля сайтов с языком: {:.1%}'.format(english_web_part))
  28. print('Индекс проникновения в интернет:{:.2f}' . format(english_index))
  29. print()
  30.  
  31. russian_speakers_part = russian_speakers / total_speakers
  32. russian_web_sites = russian_web_part * total_web
  33. russian_index = 1000 * russian_web_sites / russian_speakers
  34. print('--- Русский язык ---')
  35. print('Доля говорящих на языке: {:.1%}'.format(russian_speakers_part))
  36. print('Доля сайтов с языком: {:.1%}'.format(russian_web_part))
  37. print('Индекс проникновения в интернет:{:.2f}' . format(russian_index))
  38. print()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top