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)
Built Distribution
Close
Hashes for auto_economics-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64ab61d2d41e0cbf4b1eaf50451e7220fed03162cbff83623847d2bf4bd1b165 |
|
MD5 | 7c01160f05ee47fab497b3f64063e01b |
|
BLAKE2b-256 | 110b4770400bf56169380d7537715300406abd3c3de1ab6e5151641535a66eb6 |