for each of her sales , a saleswoman receives a commission equal to 20 percent of the first $ 500 of the total amount of the sale , plus 50 percent of the total amount in excess of $ 500 . if the total amount of one of her sales was $ 800 , the saleswoman ’ s commission was approximately what percent of the total amount of the sale ?
n0 = 20.0
n1 = 500.0
n2 = 50.0
n3 = 500.0
n4 = 800.0
t0 = n0 / 100.0
t1 = n2 / 100.0
t2 = n4 - n1
t3 = n1 * t0
t4 = t1 * t2
t5 = t3 + t4
t6 = t5 / n4
answer = t6 * 100.0
print(answer)