- #1
Avatrin
- 245
- 6
Homework Statement
This is not about one problem, it is rather about a type of problem:
How do I define, in Python, a number which is defined by its individual digits? For instance:
Pandigital numbers..
Palindromes..
Circular primes..
What commands do I need to work with to find these kinds of numbers?
Homework Equations
An n-digit number is pandigital if it makes use of all the digits 1 to n exactly once.
A palindromic number reads the same both ways.
The Attempt at a Solution
I don't know what commands to use.
def palindrome(n):
if n is ??:
return True
else:
return False