Step-by-step explanation:
days = int(input('Enter number of days: '))
total_pay = 0
current_day = 1
print('Day\tSalary\tTotal Pay')
while current_day <= days:
salary = 2 ** (current_day - 1)
total_pay += salary
print("%d\t$%.2f\t$%.2f" % (current_day, salary/100, total_pay/100))
if total_pay > 5000:
print("It is worth earning pay at this rate if you work for at least %d days because you just made $%.2f" % (current_day, total_pay/100))
current_day += 1
print("Total pay: $%.2f" % (total_pay/100))