Last active
July 11, 2018 01:01
-
-
Save NicholasTD07/602932afe28fba8968c32a402d83ec97 to your computer and use it in GitHub Desktop.
Which GoGet plan should I pick?
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
WEEKS = 52 | |
MONTHS = 12 | |
# per year | |
def starter(hours_per_week, days_per_month): | |
base = 49 | |
hourly = 10.65 | |
daily = 87 | |
return price(base, hourly, daily, hours_per_week, days_per_month) | |
def occasional(hours_per_week, days_per_month): | |
base = 144 | |
hourly = 9.45 | |
daily = 79 | |
return price(base, hourly, daily, hours_per_week, days_per_month) | |
def frequent(hours_per_week, days_per_month): | |
base = 360 | |
hourly = 6.35 | |
daily = 74 | |
return price(base, hourly, daily, hours_per_week, days_per_month) | |
def price(base, hourly, daily, hours_per_week, days_per_month): | |
return base + hours_per_week * hourly * WEEKS + days_per_month * daily * MONTHS | |
def compare(hours_per_week, days_per_month): | |
print(hours_per_week, days_per_month) | |
print("Total hours per year: {}".format(hours_per_week * WEEKS)) | |
print("Total days per year: {}".format(days_per_month * MONTHS)) | |
print("Price for starter plan: {}\nPrice for occasional plan: {}\nPrice for frequent plan: {}\n".format( | |
starter(hours_per_week, days_per_month), | |
occasional(hours_per_week, days_per_month), | |
frequent(hours_per_week, days_per_month) | |
) | |
) | |
compare(0, 0) | |
compare(1, 0) | |
compare(0, 1) | |
compare(1, 1) | |
compare(2, 0) | |
compare(0, 2) |
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
0 0 | |
Total hours per year: 0 | |
Total days per year: 0 | |
Price for starter plan: 49.0 | |
Price for occasional plan: 144.0 | |
Price for frequent plan: 360.0 | |
1 0 | |
Total hours per year: 52 | |
Total days per year: 0 | |
Price for starter plan: 602.8000000000001 | |
Price for occasional plan: 635.4 | |
Price for frequent plan: 690.2 | |
0 1 | |
Total hours per year: 0 | |
Total days per year: 12 | |
Price for starter plan: 1093.0 | |
Price for occasional plan: 1092.0 | |
Price for frequent plan: 1248.0 | |
1 1 | |
Total hours per year: 52 | |
Total days per year: 12 | |
Price for starter plan: 1646.8000000000002 | |
Price for occasional plan: 1583.4 | |
Price for frequent plan: 1578.2 | |
2 0 | |
Total hours per year: 104 | |
Total days per year: 0 | |
Price for starter plan: 1156.6000000000001 | |
Price for occasional plan: 1126.8 | |
Price for frequent plan: 1020.4 | |
0 2 | |
Total hours per year: 0 | |
Total days per year: 24 | |
Price for starter plan: 2137.0 | |
Price for occasional plan: 2040.0 | |
Price for frequent plan: 2136.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you drive more than one hour a week or one full day a month, pick the frequent plan.