diff options
author | Joshua Drake <joshua.drake@ditchwitch.com> | 2023-04-07 08:13:49 -0500 |
---|---|---|
committer | Joshua Drake <joshua.drake@ditchwitch.com> | 2023-04-07 08:13:49 -0500 |
commit | 1161f9a034de06a63538e3a9a0b7717098c744d9 (patch) | |
tree | 55bb842b2daa4f096eb7916a8d3630426fc1c376 /Problem4.py |
Diffstat (limited to 'Problem4.py')
-rw-r--r-- | Problem4.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Problem4.py b/Problem4.py new file mode 100644 index 0000000..2cd056d --- /dev/null +++ b/Problem4.py @@ -0,0 +1,14 @@ +def ispalandrome(n): + n = list(str(n)) + m = list(reversed(n)) + if n == m: + return True + else: + return False +largestpalindrome = 0 +for x in range(100,1000): + for y in range(100,1000): + if ispalandrome(x*y) and (x*y > largestpalindrome): + largestpalindrome = (x*y) + +print(largestpalindrome) |