Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- x = np.array([0.0341, 0.0174, 0.0185, 0.0131, 0.0096]) #Rates of trees planted
- y = np.array([0.0115, 0.0073, 0.0056, 0.0082, 0.0105]) #Rates of trees destroyed
- a = np.array([365, 2036, 285, 226, 460]) #Number of trees in 1975
- b = np.array([471, 2494, 361, 251, 485]) #Number of trees in 1985
- c = np.array([622, 2976, 441, 278, 499]) #Number of trees in 1995
- d = np.array([803, 3435, 523, 314, 514]) #Number of trees in 2005
- e = np.array([1013, 3827, 592, 344, 522]) #Number of trees in 2015
- ax = sum(a*x*1000)
- print ('The number of trees planted in 1975 was', ax)
- bx = sum(b*x*1000)
- print ('The number of trees planted in 1985 was', bx)
- cx = sum(c*x*1000)
- print ('The number of trees planted in 1995 was', cx)
- dx = sum(d*x*1000)
- print ('The number of trees planted in 2005 was', dx)
- ex = sum(e*x*1000)
- print ('The number of trees planted in 2015 was', ex)
- print()
- ay = sum(a*y*1000)
- print ('The number of trees destroyed in 1975 was', ay)
- by = sum(b*y*1000)
- print ('The number of trees destroyed in 1985 was', by)
- cy = sum(c*y*1000)
- print ('The number of trees destroyed in 1995 was', cy)
- dy = sum(d*y*1000)
- print ('The number of trees destroyed in 2005 was', dy)
- ey = sum(e*y*1000)
- print ('The number of trees destroyed in 2015 was', ey)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement