from math import ceil
def g(x):
stringx = str(x)
for I in range(x-1,0,-1):
for I in range(int(ceil(x**0.5))+1,9999):
if str(i) == str(i)[::-1]:
return i
so far this is my code but still have an error...
def g(x):
stringx = str(x)
for I in range(x-1,0,-1):
for I in range(int(ceil(x**0.5))+1,9999):
if str(i) == str(i)[::-1]:
return i
so far this is my code but still have an error...
0
