SHARE
TWEET

Untitled

a guest Jun 24th, 2017 27 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import random
  2. import math
  3.  
  4. sigma = 0.00000005670373
  5.  
  6. m = round(random.uniform(0.8,2.0), 2)
  7. print "Working mass:\t%s" % m
  8.  
  9. if m < 0.43:
  10.     l = 0.23*pow(m,2.3)
  11. elif 0.43 < m < 2:
  12.     l = pow(m,4)
  13. elif 2.0 < m < 20:
  14.     l = 1.5*pow(m,3.5)
  15. else:
  16.     l = 3200*m
  17. print "Luminosity:\t%s" % l
  18.  
  19. r = pow(m,0.85)
  20. print "Radius:\t\t%s" % r
  21.  
  22. L = l
  23. b = 4 * math.pi * sigma * r**2
  24.  
  25. T = (l/b)**0.25
  26. print T
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