Skip to main content

Automated Economics

Project description

auto_economics

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

Install

pip install auto_economics

Link: https://pypi.org/project/auto-economics/

How to use

from auto_economics.core import Free_market, Monopoly
supply_function = " x"
demand_function = "10 -  x"
market = Free_market(supply=supply_function, demand=demand_function)
consumer_surplus = market.get_consumer_surplus()
print("Consumer Surplus:", round(consumer_surplus))

producer_surplus = market.get_producer_surplus()
print("Producer Surplus:", round(producer_surplus))

economic_surplus = market.get_economic_surplus()

print("Economic Surplus:", round(economic_surplus))
Consumer Surplus: 12
Producer Surplus: 12
Economic Surplus: 25
market.get_graph(complete=True)
cannot multiply variables with zero

price = market.get_price()
quantity = market.get_quantity()
print(f"Price: {round(price)}, Quantity: {round(quantity)}")
Price: 5, Quantity: 5
supply = "x"
demand = "10 - x"
market = Monopoly(supply, demand)

market.get_graph(complete=True)
print(f"Economic surplus in monopoly: {round(market.get_economic_surplus())}")

Economic surplus in monopoly: 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

auto_economics-0.0.3.tar.gz (11.4 kB view hashes)

Uploaded Source

Built Distribution

auto_economics-0.0.3-py3-none-any.whl (10.2 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