" /:' list'不支持的操作数类型和'列出'"在cpython中

时间:2015-10-09 20:09:16

标签: cpython

我对编程完全不熟悉。你可以说编码方面的文盲。我正在尝试使用3.4版本的解释器学习cpython。我收到了错误

"unsupported operand type(s) for /: 'list' and 'list'" 

在以下代码中:

sl = input("Please enter Loan amount :-  ")
si = input("Please enter desired interest rate (in decimal point) :-  ")
sn = input("Please enter number of installments :-  ")
L=float(sl)
I=float(si)
N=float(sn)

EMI = [L * I * (1+I) * N] / [((1+I) * N)-1]
print(EMI)

1 个答案:

答案 0 :(得分:0)

在Python中,列表由方括号定义(类似于C中的数组)。在表达中 HTTP_REFERER您试图划分两个列表。用普通圆括号替换它们可以消除这个问题。