31 lines
917 B
Python
31 lines
917 B
Python
|
|
message01 = '''
|
|
Mass Excise Tax Fees
|
|
====================
|
|
|
|
The tax depends on the vehicle age. For this program we only calculate the
|
|
excise tax on the first year of purchase.
|
|
https://www.sec.state.ma.us/divisions/cis/tax/motor-excise.htm
|
|
|
|
Vehicle Age Percentage of List Price
|
|
In the year preceding the model year
|
|
(brand new car released before model year) 50%
|
|
In the model year 90%
|
|
In the second year 60%
|
|
In the third year 40%
|
|
In the fourth year 25%
|
|
In the fifth and succeeding years 10%
|
|
'''
|
|
print(message01)
|
|
# Tax table for excise tax by year.
|
|
exciseTaxRateTable = [.5, .9, .6, .4, .25, .10, .10, .10, .10, .10]
|
|
yearIndex = -1 # Indicates a date prior to the model year; i.e you bought a model year 2024 in year 2023.
|
|
|
|
# Change the 8 to 10. The program will fault.
|
|
while yearIndex <= 8:
|
|
print(f"{yearIndex:2d} {exciseTaxRateTable[yearIndex]}")
|
|
yearIndex += 1 # Shorthand for yearIndex = yearIndex + 1
|
|
|
|
|
|
|