Zip() in for loops

Report a typo

You have three variables: interest_rates, years and loan_principals. They contain lists of integers. Write a for loop statement that prints the total interest paid for each loan as an integer, each one in a new line.

Use the following formula: interest_paid = interest_rate * year * loan_principal

The following lists interest_rates, years and loan_principals have already been defined; you do not need to accept any input.

Sample Input 1:

0.02, 0.05, 0.04
2, 3, 5
1000, 2000, 1400

Sample Output 1:

40
300
280
Write a program in Python 3
# please do not modify the following code
interest_rates = [float(x) for x in input().split(',')]
years = [int(x) for x in input().split(',')]
loan_principals = [int(x) for x in input().split(',')]

# your code here
___

Create a free account to access the full topic