Skip to main content

graphs for economics

Project description

graphs_for_economics

This file will become your README and also the index of your documentation.

Install

pip install graphs_for_economics

How to use

graph = Graph_free_market()
supply_function = " x**2"
demand_function = "1000 -  x**2"
consumer_surplus = graph.get_consumer_surplus(supply_function, demand_function)
print("Consumer Surplus:", consumer_surplus)

producer_surplus = graph.get_producer_surplus(supply_function, demand_function)
print("Producer Surplus:", producer_surplus)

economic_surplus = graph.get_economic_surplus(supply_function, demand_function)

print("Economic Surplus:", economic_surplus)
Consumer Surplus: 7451
Producer Surplus: 18454
Economic Surplus: 25905
graph.market_graph(supply_function, demand_function,0, 40, 10, complete=True)

price = graph.get_price(supply_function, demand_function)
quantity = graph.get_quantity(supply_function, demand_function)
print(f"Price: {price}, Quantity: {quantity}")
Price: 500, Quantity: 22

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphs_for_economics-0.0.4.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

graphs_for_economics-0.0.4-py3-none-any.whl (10.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page