Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 999
- y = 999
- n = 999 * 999
- def checkPalindrome():
- global n,x,y
- if str(n) == str(n)[::-1]:
- print (str(n)[::-1] + ' is the highest palindrome with ' + str(x) + ' * ' + str(y))
- x -= 1
- def getNumber():
- global x,y,n
- if x >= 101:
- n = x * y
- else:
- n = x * y
- return n
- while x > 100 and y > 100:
- n = getNumber()
- checkPalindrome()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement