0
类型错误:“诠释”对象不是可调用蟒“int对象是不可调用的”
任何人都知道如何解决这个问题?我知道错误总是在等式中的某个地方。由于
decimal = 0
rate = 0
principal = 0
years = 0
def simple(p, r, n,):
decimal = r/100
print("Principal: " + str(p))
print("Rate: " + str(decimal))
print("Number of Years: " + str(n))
total = p (1 + (decimal * n))
print("Total: " + str(total))
def main():
principal = int(input("Enter Principal: "))
rate = float(input("Enter Rate: "))
years = int(input("Enter Numbers of Years: "))
simple(principal, rate, years)
main()
print("End of Program")
既然这是python代码缩进它将是非常有用的,因为错误的缩进可能会导致一些意想不到的问题! – SSchneid