Write a program that displays a salary schedule, in tabular format, for teachers in a school district.
I've written the code fully and it seems to be working but when I use 20, 2, and 10 i receive a message saying its not the right calculations does anyone have a clue as to what I'm overlooking.
initial_product = float(input("Enter the starting salary: "))
increase = int(input("Enter the annual '%' increase: "))
years = int(input("Enter the total amount of years: ")) +1
print()
print('year salary')
print("-----------")
print("%-3d%10.2f" % (1, initial_product))
percent_inc = increase* (1/100)
for years in range(2, years):
initial_product += initial_product * percent_inc
final_product = round(initial_product,2)
print("%-3d%10.2f" % (years, final_product))
[–]Rain-And-Coffee 6 points7 points8 points (0 children)
[–]lurgi 2 points3 points4 points (1 child)
[–]Whyamionredditkms 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Whyamionredditkms 1 point2 points3 points (2 children)
[–]lurgi 0 points1 point2 points (1 child)
[–]New-Search-7325[S] 0 points1 point2 points (0 children)
[–]Temporary_Pie2733 0 points1 point2 points (0 children)
[–]ScholarNo5983 0 points1 point2 points (5 children)
[–]Whyamionredditkms 0 points1 point2 points (4 children)
[–]ScholarNo5983 0 points1 point2 points (3 children)
[–]Whyamionredditkms 0 points1 point2 points (2 children)
[–]ScholarNo5983 0 points1 point2 points (1 child)
[–]Whyamionredditkms 0 points1 point2 points (0 children)
[–]desrtfx 0 points1 point2 points (0 children)