palindrome

Solving palindromic 'Triangle Quest' puzzle in Python

Solving palindromic 'Triangle Quest' puzzle in Python Question: I’m trying to solve this programming puzzle: You are given a positive integer N (0 < N < 10). Your task is to print a palindromic triangle of size N. For example, a palindromic triangle of size 5 is: 1 121 12321 1234321 123454321 You can’t take …

Total answers: 16

How to check for palindrome using Python logic

How to check for palindrome using Python logic Question: I’m trying to check for a palindrome with Python. The code I have is very for-loop intensive. And it seems to me the biggest mistake people do when going from C to Python is trying to implement C logic using Python, which makes things run slowly, …

Total answers: 35