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
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