def calculate_tax(income_input):
income_inpu = {}
for item in income_input:
tax = '0'
income = income_input[item]
if income in range(0, 1001):
tax = (0*income)
if income in range(1001, 10001):
tax = (0.1 * (income-1000))
if income in range(10001, 20201):
tax = ((0.1*(10000-1000)) + (0.15*(income-10000)))
if income in range(20201, 30751):
tax = ((0.1*(10000-1000)) + (0.15*(20200-10000)) + (0.2*(income-20200)))
if income in range(30751, 50001):
tax = ((0.1*(10000-1000)) + (0.15*(20200-10000)) + (0.2*(30750-20200)) + (0.25*(income-30750)))
if (income > 50000):
tax = ((0.1*(10000-1000)) + (0.15*(20200-10000)) + (0.2*(30750-20200)) + (0.25*(50000-30750)) + (0.3*(income-50000)))
income_inpu[item] = tax
return income_inpu