'''1. Python Program to check Armstrong Number? HINT : 153 = 1*1*1 + 5*5*5 + 3*3*3 // 153 is an Armstrong number.''' n = 153 s = n b = len(str(n)) sum1 = 0 while n != 0: r = n % 10 sum1 = sum1+(r**b) n = n//10 if s == sum1: print("The given number", s, "is armstrong number") else: print("The given number", s, "is not armstrong number") Output: The given number 153 is armstrong number '''2. Python Program for How to check if a given number is Fibonacci number? HINT : A Fibonacci sequence is the integer sequence of 0, 1, 1, 2, 3, 5, 8.... The first two terms are 0 and 1. All other terms are obtained by adding the preceding two terms. This means to say the nth term is the sum of (n-1)th and (n-2)th term. ''' code: n=int(input('Please Enter a number:')) prev,next,i=0,1,0 while i<=n: if(i == n): break i=prev+next prev=next next=i if(i==n): print(n, 'the given number is a Fibonacci number') else: print(n, 'the given number is not a Fibonacci number') Output: Please Enter a number:13 13 the given number is a Fibonacci number