Science, asked by aisha261934, 7 months ago

Write a program to print 20 numbers to an array and print the average of all the palindrome numbers of it......



help me with this question..​

Answers

Answered by utsavsinghal
0

Answer:

def isPalindrome(n: int) -> bool:

rev = 0

i = n

while i > 0:

rev = rev * 10 + i % 10

i //= 10

return (n == rev)

def countPal(minn: int, maxx: int) -> None:

for i in range(minn, maxx + 1):

if isPalindrome(i):

print(i, end = " ")

if __name__ == "__main__":

countPal(100, 2000)

Explanation:

Mark me as Brainliest

Similar questions