2016-04-26 83 views
1
import math 
# Program intro 
def main(): 
# float print functions for n, A, r 

n = float(input('How much time in years do you need to pay back the loan?')) 
A = float(input("What is the amount of money you would like to borrow in whole dollars $?")) 
r = float(input("What is your desired interest rate in a whole number?" 
P = (r + A)/(n * A) 

为什么是P =(R + A)/(N * A)一个语法错误:无效的语法为什么这是Python中无效的语法错误?

+4

你错过闭幕前一行的括号。 – mgilson

回答

4
r = float(input("What is your desired interest rate in a whole number?" 
                    ^
                 Missing 2 parenthesis 

正确的路线将如下所示:

r = float(input("What is your desired interest rate in a whole number?")) 
+0

谢谢你一个愚蠢的错误! – VChocolate