Question: please review and validate why not getting correct output using python startingSalary = float ( input ( Enter starting salary: ) ) numberYears =

please review and validate why not getting correct output using python startingSalary=float(input("Enter starting salary:"))
numberYears=int(input("Enter number of years:"))
percentage = float(input("Enter the annual % increase:"))
for year in range(1, numberYears +1):
if numberYears >10:
startingSalary =(1+(startingSalary)*(percentage/100))
print(f"Year {year} : ${startingSalary:.2f}")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!