[Tutor] project euler #4
Nitish Kumar
nitishworks1 at gmail.com
Sun May 10 23:46:25 EDT 2020
i am an ansolute noob at python...i started teaching myself a while back
please review my code....and please point out the errors...
can i not call or a function in a loop??
#largest 3x3 digit palindrome no
palin = []
for i in range(100, 999):
for j in range(100, 999):
x = (i* j)
if x isPalindrome(x)
palind.append(t)
print(palin)
def isPalindrome(n):
temp = n
rev = 0
while(n > 0):
digit = n % 10
rev = rev*10 + digit
n = n // 10
if rev == temp:
return True
More information about the Tutor
mailing list