def emi_calculator(principal, interest_rate, num_years): num_payments = num_years * 12 # total number of monthly payments monthly_interest_ra…