任何人都可以提供任何帮助,为什么下面的代码总是返回相同的校验码?
def ISBN():
numlist = []
request = raw_input("Please enter the 10 digit number: ")
if len(request) == 10:
listofnums = [int(digit) for digit in '1234567890']
multipliers = reversed(range(2,12))
multipliednums = [a*b for a,b in zip(listofnums, multipliers)]
print multipliednums
added_result = sum(multipliednums)
print added_result
remainder = added_result % 11
print remainder
check_digit = 11 - remainder
print check_digit
ISBN()
if len(request) != 10:
print "Invalid Input"
ISBN()
ISBN()
关于我如何改进代码的任何信息或提示,或者只是为什么无论输入什么它都会不断地返回相同的数字(9)。谢谢