Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- import numpy as np
- import time
- def main():
- print ('''Welcome user. This program is an simulation to start up a society in the present world. Here, you will
- be capable to calculate the cost, land, and resources you will require to supply for the population you calculate.
- At the same time, the growth of the population after a set amount of years will be shown as well, and you will
- have the option to see how the resources, land and cost will change throughout the years. Two forms will be shown
- with this program, a primeval civilization that is capable to supply for the survival of it's people, and a
- high quality civilization that is able to supply for the *pleasures* of it's people.''')
- while(True):
- start = input("Press Enter to Continue")
- if start == "":
- break
- if start != "":
- pass
- amount = int(input ("Please insert the number of the starting population you want to work with: "))
- print ("You are starting your civilization with " + str(amount) + " people.")
- time.sleep(0.5)
- # Data for plotting
- years = np.arange (0, 200, 1)
- t = np.arange (0,200, 1) ** 1.07
- fig, ax = plt.subplots()
- ax.plot(years, t)
- ax.set(xlabel='time (years)', ylabel=' population (mV)',
- title='About as simple as it gets, folks')
- ax.grid()
- fig.savefig("test.png")
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement