Jul-08-2018, 04:05 PM
Quote:is 4 the only number that has this characteristhic?Yep.
def chech_num(n): if n**n == n + n: return 'Ok!' else: return 'Fail!' n = float(input('Number: ')) / 2 print(chech_num(n))To auto check, you can loop through a range of numbers.