fork download
  1. # List of pokemon sizes, from Bulbapedia
  2. # (normal size, mega/totem/alolan size)
  3. mega = [
  4. (2.0,2.4),
  5. (1.7,1.7),
  6. (1.6,1.6),
  7. (1.5,1.2),
  8. (1.5,1.4),
  9. (2.2,2.2),
  10. (1.5,1.7),
  11. (6.5,6.5),
  12. (1.8,2.1),
  13. (2.0,2.3),
  14. (2.0,1.5),
  15. (1.4,1.4),
  16. (1.8,2.0),
  17. (1.5,1.7),
  18. (1.4,1.9),
  19. (2.0,2.5),
  20. (1.9,1.9),
  21. (1.6,1.6),
  22. (0.6,1.0),
  23. (2.1,2.2),
  24. (1.3,1.3),
  25. (1.5,1.8),
  26. (1.1,1.2),
  27. (1.2,1.2),
  28. (1.9,1.9),
  29. (1.2,1.3),
  30. (2.2,2.7),
  31. (1.0,1.4),
  32. (1.5,2.2),
  33. (1.6,2.0),
  34. (9.2,10.5),
  35. (1.7,1.9),
  36. (1.5,1.9),
  37. (0.5,0.5),
  38. (1.8,2.5),
  39. (1.9,2.5),
  40. (1.1,1.5),
  41. (1.5,2.1),
  42. (1.5,1.8),
  43. (1.6,2.5),
  44. (1.4,1.8),
  45. (2.0,2.3),
  46. (7.0,10.8),
  47. (1.2,1.3),
  48. (1.6,1.6),
  49. (1.1,1.5),
  50. (0.7,1.1)
  51. ]
  52.  
  53. alolan=[
  54. (0.7,0.7),
  55. (0.8,0.7),
  56. (1.0,1.2),
  57. (0.6,0.6),
  58. (0.7,0.7),
  59. (1.0,1.1),
  60. (1.0,1.0),
  61. (1.4,1.7),
  62. (1.2,1.0),
  63. (1.0,1.0)
  64. ]
  65. #2.0,10.9, # Totem Exeggutor outlier
  66.  
  67. totem = [
  68. (0.7,1.4),
  69. (1.0,1.7),
  70. (0.7,1.4),
  71. (1.5,2.6),
  72. (0.2,0.4),
  73. (1.8,3.1),
  74. (0.9,1.5),
  75. (1.2,2.1),
  76. (0.3,0.6),
  77. (0.2,0.4),
  78. (1.6,2.4)
  79. ]
  80.  
  81. def calc_size(tabl):
  82. _min = 1000.0
  83. _max = -1000.0
  84. _avg = 0
  85. temp = tabl
  86. for t in temp:
  87. a = t[1]/t[0]
  88. if a > _max: _max = a
  89. if a < _min: _min = a
  90. _avg += a
  91. _avg = _avg / len(temp)
  92. return (_min,_max,_avg)
  93.  
  94. def print_size2(s):
  95. return "min %.3f max %.3f average %.3f" % s
  96.  
  97. totem_stat = calc_size(totem)
  98. mega_stat = calc_size(mega)
  99. alolan_stat = calc_size(alolan)
  100.  
  101. print("Size differences:")
  102. print("totem " + print_size2(totem_stat) )
  103. print("mega " + print_size2(mega_stat) )
  104. print("alolan " + print_size2(alolan_stat) )
  105.  
  106. _ts = totem_stat[1]
  107. _ms = mega_stat[1]
  108. _as = alolan_stat[1]
  109.  
  110. print( "\n%.3f * %.3f * %.3f * 1.4 = %.3f " % (_ts, _ms, _as, _ts*_ms*_as*1.4) )
Success #stdin #stdout 0.01s 27712KB
stdin
Standard input is empty
stdout
Size differences:
totem  min 1.500   max 2.000   average 1.825
mega   min 0.750   max 1.667   average 1.174
alolan min 0.833   max 1.214   average 1.022

2.000 * 1.667 * 1.214 * 1.4 = 5.667