DISARIUM NUMBER PROGRAM IN PYTHON PROGRAMMING || PYTHON PROGRAMMING

Поделиться
HTML-код
  • Опубликовано: 27 янв 2025

Комментарии • 4

  • @abhijitmazumder417
    @abhijitmazumder417 2 года назад +1

    Thank you, Sir. I found this video very helpful.

  • @storyworld2395
    @storyworld2395 2 года назад

    Sir aap .net ka v lecture start kijiye na

  • @atchuthsamanasa2439
    @atchuthsamanasa2439 2 года назад

    n=int(input())
    temp=n
    l=[]
    while(n>0):
    k=n%10
    l.append(int(k))
    n=n//10
    sum=0
    for z in range(2):
    x=(l[z-1]**(z+1))
    sum=x+sum
    if(temp==sum):
    print("Disarium number")
    else:
    print("not a number")

  • @jayakumar852
    @jayakumar852 2 года назад +1

    import math
    number = input("Enter a number: ")
    i = 0
    final_num = 0
    for num in number:
    i+=1
    final_num += int(math.pow(int(num), i))


    if (int(number) == final_num):
    print(f"The number {number} is a Happy Number")
    else:
    print(f"The number {number} is not a Happy Number")