Python 3:
from decimal import Decimal
def main():
initSalary=float(input(“Enter starting salary:$ “))
percentIncrement=float(input(“Enter percentage increase per year:% “))
noOfYears=int(input(“Enter no of years:”))
rowFormat='{0:10}’
print(rowFormat.format(“Year”, “Salary in $”))
for i in range(1,noOfYears+1):
print(rowFormat.format(i,round(Decimal(initSalary), 2)))
initSalary=initSalary+(initSalary*(percentIncrement/100))
main()
Indentation:
https://d2vlcm61l7u1fs.cloudfront.net/media%2F666%2F666ffeaf-e0ab-4c59-9524-7bf864f6a212%2Fphp2V4OgP.png
https://d2vlcm61l7u1fs.cloudfront.net/media%2Fa00%2Fa0054745-2cdc-4c59-8e88-321fad767df5%2Fphpy5iB6a.png
“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”
What Students Are Saying About Us
.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐"Honestly, I was afraid to send my paper to you, but splendidwritings.com proved they are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"
.......... Customer ID: 14***| Rating: ⭐⭐⭐⭐⭐
"The company has some nice prices and good content. I ordered a term paper here and got a very good one. I'll keep ordering from this website."