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)
round(market.get_economic_surplus())
$\displaystyle 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.2.tar.gz
(11.4 kB
view hashes)
Built Distribution
Close
Hashes for auto_economics-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5230ad0d71be3d5c73434dea15b7ad8e4e651b4fb57089b032ba6422b9afeca |
|
MD5 | ef110a4e099509090d1b4224a210c357 |
|
BLAKE2b-256 | 0001a2ae62cfcd7eafb7123067585267996ad5315f2d4d6d5ead61c8c2bca76e |