purchase = [150000, 210000, 399990, 990000, 1000000]

total = 0
for p in purchase:
    if p >= 1000000:
        total += 50000
    elif p >= 600000:
        total += 30000
    elif p >= 400000:
        total += 20000
    elif p >= 200000:
        total += 10000

print(total)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: