SHARE
TWEET

Untitled

a guest Oct 21st, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import numpy as np
  2.  
  3. x = np.array([0.0341, 0.0174, 0.0185, 0.0131, 0.0096])  #Rates of trees planted
  4. y = np.array([0.0115, 0.0073, 0.0056, 0.0082, 0.0105])  #Rates of trees destroyed
  5.  
  6. a = np.array([365, 2036, 285, 226, 460])  #Number of trees in 1975
  7. b = np.array([471, 2494, 361, 251, 485])  #Number of trees in 1985
  8. c = np.array([622, 2976, 441, 278, 499])  #Number of trees in 1995
  9. d = np.array([803, 3435, 523, 314, 514])  #Number of trees in 2005
  10. e = np.array([1013, 3827, 592, 344, 522])  #Number of trees in 2015
  11.  
  12. ax = sum(a*x*1000)
  13. print ('The number of trees planted in 1975 was', ax)
  14.  
  15. bx = sum(b*x*1000)
  16. print ('The number of trees planted in 1985 was', bx)
  17.  
  18. cx = sum(c*x*1000)
  19. print ('The number of trees planted in 1995 was', cx)
  20.  
  21. dx = sum(d*x*1000)
  22. print ('The number of trees planted in 2005 was', dx)
  23.  
  24. ex = sum(e*x*1000)
  25. print ('The number of trees planted in 2015 was', ex)
  26.  
  27. print()
  28.  
  29. ay = sum(a*y*1000)
  30. print ('The number of trees destroyed in 1975 was', ay)
  31.  
  32. by = sum(b*y*1000)
  33. print ('The number of trees destroyed in 1985 was', by)
  34.  
  35. cy = sum(c*y*1000)
  36. print ('The number of trees destroyed in 1995 was', cy)
  37.  
  38. dy = sum(d*y*1000)
  39. print ('The number of trees destroyed in 2005 was', dy)
  40.  
  41. ey = sum(e*y*1000)
  42. print ('The number of trees destroyed in 2015 was', ey)
RAW Paste Data
Top