
Patrick B. answered 04/22/21
Math and computer tutor/teacher
salary = 20000
yearNum = 0
while (salary<50000):
print(" Year # " + str(yearNum) + ": salary " + str(salary))
salary = float(salary)*1.10
yearNum = int(yearNum+1)
Ernie V.
asked 04/22/21Joe just graduated college and has been offered his first real job as a widget designer at Widgets USA, Inc. He is disappointed in the offered beginning salary; only $20,000 per year. But he is promised a 10% raise each year. Other job opportunities offer more to start, but have no promised raises. To help Joe decide, print out a table of his new salary each year until his salary reaches or exceeds $50,000. (How many years will it take?)
Using a while loop and in python form, how would I start this ?
Patrick B. answered 04/22/21
Math and computer tutor/teacher
salary = 20000
yearNum = 0
while (salary<50000):
print(" Year # " + str(yearNum) + ": salary " + str(salary))
salary = float(salary)*1.10
yearNum = int(yearNum+1)
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.