0

def Loans(x): x = int(raw_input("What is your FICO score? "))

if x >= 760: print ("Rate = 3.080")

elif x >= 700: print ("Rate = 3.302")

elif x >= 680: print ("Rate = 3.479")

elif x >= 660: print ("Rate = 3.693")

elif x >= 640: print ("Rate = 4.123")

elif x >= 620: print ("Rate = 4.66")

else: print ('Approval = No')

1 Answers1

0

The issue should be with the raw_input function. Try this:

def Loans(x):
    x = int(input("What is your FICO score? "))
    if x >= 760:
           print ("Rate = 3.080")
    elif x >= 700:
           print ("Rate = 3.302")
    elif x >= 680:
           print ("Rate = 3.479")
    elif x >= 660:
           print ("Rate = 3.693")
    elif x >= 640:
           print ("Rate = 4.123")
    elif x >= 620:
           print ("Rate = 4.66")
    else:
           print ('Approval = No')

Loans(10)

More details about the function renaming: https://stackoverflow.com/a/954840/2741329

Community
  • 1
  • 1
gmas80
  • 1,218
  • 1
  • 14
  • 44