def tmp(credit, percent, years): for _ in range(years): credit = credit + credit*percent/100 return credit
tmp(1000, 10, 2)