Question: Please do the following in Python 3. Please comment your code so that I understand what is going on. A palindrome is a string that
Please do the following in Python 3. Please comment your code so that I understand what is going on.

A palindrome is a string that reads the same forwards and backwards. We will call a num- ber octaldrome if its octal representation is a palindrome. So 945 is an octaldrome as in oc- tal it is 1661. The first nine positive octaldromes are 1, 2, 3, 4, 5, 6, 7, 9 and 18. We want to find the n'th positive octaldrome. For example the 1'st positive octaldrome is 1, the fifth pos- itive octaldrome is 5 and the eighth positive octaldrome is 9. Write a function nth_octal- drome(n) that returns the n'th positive octaldrome. So we have nth_octaldrome(1) 1 nth_octaldrome(9) 18
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
