标签:bsp div erro number style col for put break
1 ‘‘‘ 2 题目:一个5位数,判断它是不是回文数。即12321是回文数,个位与万位相同,十位与千位相同。 3 ‘‘‘ 4 ans=[‘Yes‘,‘No‘] 5 i = int(raw_input(‘Input a number(10000~99999):‘)) 6 if i<10000 or i>99999: 7 print ‘Input Error!‘ 8 else: 9 i = str(i) 10 flag = 0 11 for j in range(0,2): 12 if i[j]!=i[4-j]: 13 flag = 1 14 break 15 print ans[flag]
标签:bsp div erro number style col for put break
原文地址:https://www.cnblogs.com/JerryZao/p/9418850.html