PYTHON!!!! Teachers in most school districts are paid on a schedule that provides a salary based on their number of years of teaching experience. For example, a beginning teacher in the Lexington School District might be paid $30,000 the first year. For each year of experience after this first year, up to 10 years, the teacher receives a 2% increase over the preceding value. Write a program that displays a salary schedule, in tabular format, for teachers in a school district. The inputs are: Starting salary Annual percentage increase Number of years for which to print the schedule Each row in the schedule should contain the year number and the salary for that year An example of the program input and output is shown below: Enter the starting salary: $30000 Enter the annual % increase: 2 Enter the number of years: 10 Year Salary ------------- 1 30000.00 2 30600.00 3 31212.00 4 31836.24 5 32472.96 6 33122.42 7 33784.87 8 34460.57 9 35149.78 10 35852.78 Results you should get: Input: 25000, 3, 5 output: Enter the starting salary: 25000 Enter the annual % increase: 3 Enter the number of years: 5 Year 1 Salary: 25000.0 Year 2 Salary: 25750.0 Year 3 Salary: 26522.5 Year 4 Salary: 27318.175 Year 5 Salary: 28137.720250000002 input: 0, 5, 5 output: Enter the starting salary: 0 Enter the number of years: 5 Year 1 Salary: 0.0 Year 2 Salary: 0.0 Year 3 Salary: 0.0 Year 4 Salary: 0.0 Year 5 Salary: 0.0 input: 34567, 4, 7 output: Enter the starting salary: 34567 Enter the annual % increase: 4 Enter the number of years: 7 Year 1 Salary: 34567.0 Year 2 Salary: 35949.68 Year 3 Salary: 37387.6672 Year 4 Salary: 38883.173888000005 Year 5 Salary: 40438.50084352001 Year 6 Salary: 42056.040877260806 Year 7 Salary: 43738.282512351245 input: 30000, 2, 10 output: Enter the starting salary: 30000 Enter the annual % increase: 2 Enter the number of years: 10 Year 1 Salary: 30000.0 Year 2 Salary: 30600.0 Year 3 Salary: 31212.0 Year 4 Salary: 31836.240000000005 Year 5 Salary: 32472.964799999998 Year 6 Salary: 33122.424096 Year 7 Salary: 33784.87257792 Year 8 Salary: 34460.570029478404 Year 9 Salary: 35149.781430067975 Year 10 Salary: 35852.77705866933
PYTHON!!!!
Teachers in most school districts are paid on a schedule that provides a salary based on their number of years of teaching experience.
For example, a beginning teacher in the Lexington School District might be paid $30,000 the first year. For each year of experience after this first year, up to 10 years, the teacher receives a 2% increase over the preceding value.
Write a program that displays a salary schedule, in tabular format, for teachers in a school district. The inputs are:
- Starting salary
- Annual percentage increase
- Number of years for which to print the schedule
Each row in the schedule should contain the year number and the salary for that year
An example of the program input and output is shown below:
Enter the starting salary:
$30000
Enter the annual % increase: 2
Enter the number of years: 10
Year Salary -------------
1 30000.00
2 30600.00
3 31212.00
4 31836.24
5 32472.96
6 33122.42
7 33784.87
8 34460.57
9 35149.78
10 35852.78
Results you should get:
Input: 25000, 3, 5
output:
Enter the starting salary: 25000
Enter the annual % increase: 3
Enter the number of years: 5 Year
1 Salary: 25000.0 Year
2 Salary: 25750.0 Year
3 Salary: 26522.5 Year
4 Salary: 27318.175 Year
5 Salary: 28137.720250000002
input: 0, 5, 5
output:
Enter the starting salary: 0
Enter the number of years: 5
Year 1 Salary: 0.0
Year 2 Salary: 0.0
Year 3 Salary: 0.0
Year 4 Salary: 0.0
Year 5 Salary: 0.0
input: 34567, 4, 7
output:
Enter the starting salary: 34567
Enter the annual % increase: 4
Enter the number of years: 7
Year 1 Salary: 34567.0
Year 2 Salary: 35949.68
Year 3 Salary: 37387.6672
Year 4 Salary: 38883.173888000005
Year 5 Salary: 40438.50084352001
Year 6 Salary: 42056.040877260806
Year 7 Salary: 43738.282512351245
input: 30000, 2, 10
output:
Enter the starting salary: 30000
Enter the annual % increase: 2
Enter the number of years: 10
Year 1 Salary: 30000.0
Year 2 Salary: 30600.0
Year 3 Salary: 31212.0
Year 4 Salary: 31836.240000000005
Year 5 Salary: 32472.964799999998
Year 6 Salary: 33122.424096
Year 7 Salary: 33784.87257792
Year 8 Salary: 34460.570029478404
Year 9 Salary: 35149.781430067975
Year 10 Salary: 35852.77705866933
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images