# by Nurudeen
def calculate_tax(dic):
result = {}
for name in dic.keys():
if dic[name] > 50000:
result[name]=0.3 * dic[name]
elif dic[name] > 30750:
result[name]=0.25 * dic[name]
elif dic[name] > 20200:
result[name]=0.2 * dic[name]
elif dic[name] > 10000:
result[name]=0.15 * dic[name]
elif dic[name] > 1000:
result[name]=0.1 * dic[name]
else:
result[name]=0 * dic[name]
return result
print calculate_tax({'d4guy':60500,'umu101':45000,'charley94':30000,'beejaykumar':8455,'bisola':19800,'oneluvs':90000,'folzye':11200,'lekibraky':650,'d34lw4p':1200000})
IyBieSBOdXJ1ZGVlbgpkZWYgY2FsY3VsYXRlX3RheChkaWMpOgogcmVzdWx0ID0ge30KIGZvciBuYW1lIGluIGRpYy5rZXlzKCk6CiAgaWYgZGljW25hbWVdID4gNTAwMDA6CiAgIHJlc3VsdFtuYW1lXT0wLjMgKiBkaWNbbmFtZV0KICBlbGlmIGRpY1tuYW1lXSA+IDMwNzUwOgogICByZXN1bHRbbmFtZV09MC4yNSAqIGRpY1tuYW1lXQogIGVsaWYgZGljW25hbWVdID4gMjAyMDA6CiAgIHJlc3VsdFtuYW1lXT0wLjIgKiBkaWNbbmFtZV0KICBlbGlmIGRpY1tuYW1lXSA+IDEwMDAwOgogICByZXN1bHRbbmFtZV09MC4xNSAqIGRpY1tuYW1lXQogIGVsaWYgZGljW25hbWVdID4gMTAwMDoKICAgcmVzdWx0W25hbWVdPTAuMSAqIGRpY1tuYW1lXQogIGVsc2U6CiAgIHJlc3VsdFtuYW1lXT0wICogZGljW25hbWVdCiByZXR1cm4gcmVzdWx0CgoKcHJpbnQgY2FsY3VsYXRlX3RheCh7J2Q0Z3V5Jzo2MDUwMCwndW11MTAxJzo0NTAwMCwnY2hhcmxleTk0JzozMDAwMCwnYmVlamF5a3VtYXInOjg0NTUsJ2Jpc29sYSc6MTk4MDAsJ29uZWx1dnMnOjkwMDAwLCdmb2x6eWUnOjExMjAwLCdsZWtpYnJha3knOjY1MCwnZDM0bHc0cCc6MTIwMDAwMH0p
{'oneluvs': 27000.0, 'charley94': 6000.0, 'folzye': 1680.0, 'd34lw4p': 360000.0, 'd4guy': 18150.0, 'lekibraky': 0, 'beejaykumar': 845.5, 'bisola': 2970.0, 'umu101': 11250.0}