|
刚学Python写了个迭代函数不知道这个类型是怎么回事,希望大神指点迷津
#!/bin/ env python
#2015/8/3
def fLB (n):
if n == 1:
S = 1
if n == 2:
S = 1
if n > 2:
x=2
while x <= n:
x += 1
S = fLB( n - 1) + fLB(n - 2)
print S
n =int(raw_input("Please input your num: " ))
fLB (n)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType' |
|