Created
January 6, 2020 16:42
-
-
Save dolohow/caf56d9e4dcd7266cf68adfbc6342caf to your computer and use it in GitHub Desktop.
Price of importing car in USA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pylab import * | |
car_price_from_auction = list(range(0, 10001, 500)) | |
dollar_cost = 3.97 | |
euro_cost = 4.39 | |
euro_to_dollar = 1.11 | |
pln_to_usd = 0.25 | |
def total_cost(car_price_from_auction): | |
# all prices are dollar here | |
copart_provision = 540 # 540-790 | |
road_transport = 530 # 180-1100 | |
sea_freight = 690 | |
forwarding_fee = 150 | |
custom = (car_price_from_auction + road_transport + copart_provision + forwarding_fee + sea_freight) * 0.1 | |
#custom = (car_price_from_auction + road_transport + copart_provision + forwarding_fee) * 0.1 | |
vat = (car_price_from_auction + sea_freight + copart_provision + road_transport + forwarding_fee + custom) * 0.21 | |
#vat = (car_price_from_auction + copart_provision + road_transport + forwarding_fee) * 0.21 | |
forwarding_fee_europe = 450 * 1.11 | |
road_transport_europe = 1252 * 1.45 * pln_to_usd | |
#excise = car_price_from_auction * 0.031 | |
excise = (car_price_from_auction + copart_provision + road_transport + forwarding_fee) * 0.031 | |
commission = 0.05 * car_price_from_auction | |
if commission < 850: | |
commission = 850 | |
return (car_price_from_auction + copart_provision + road_transport + | |
sea_freight + forwarding_fee + custom + vat + forwarding_fee_europe + | |
road_transport_europe + excise + commission) | |
total_price = [total_cost(i)*dollar_cost for i in car_price_from_auction] | |
plot(car_price_from_auction, total_price) | |
title("Cena sprowadzenia auta z USA") | |
xlabel("Cena auta [$]") | |
ylabel("Cena ostateczna [zł]") | |
grid(True) | |
show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment