Advertisement
Guest User

Untitled

a guest
Sep 19th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import numpy as np
  3. import time
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. def main():
  12.  
  13.  
  14.  
  15.  
  16. print ('''Welcome user. This program is an simulation to start up a society in the present world. Here, you will
  17. be capable to calculate the cost, land, and resources you will require to supply for the population you calculate.
  18. At the same time, the growth of the population after a set amount of years will be shown as well, and you will
  19. have the option to see how the resources, land and cost will change throughout the years. Two forms will be shown
  20. with this program, a primeval civilization that is capable to supply for the survival of it's people, and a
  21. high quality civilization that is able to supply for the *pleasures* of it's people.''')
  22.  
  23. while(True):
  24. start = input("Press Enter to Continue")
  25. if start == "":
  26. break
  27. if start != "":
  28. pass
  29.  
  30. amount = int(input ("Please insert the number of the starting population you want to work with: "))
  31.  
  32. print ("You are starting your civilization with " + str(amount) + " people.")
  33.  
  34. time.sleep(0.5)
  35.  
  36.  
  37. # Data for plotting
  38. years = np.arange (0, 200, 1)
  39. t = np.arange (0,200, 1) ** 1.07
  40. fig, ax = plt.subplots()
  41. ax.plot(years, t)
  42. ax.set(xlabel='time (years)', ylabel=' population (mV)',
  43. title='About as simple as it gets, folks')
  44. ax.grid()
  45.  
  46. fig.savefig("test.png")
  47. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement