Python Program to Find Armstrong Number in an Interval - Complete Guide

Поділитися
Вставка
  • Опубліковано 18 жов 2024
  • In this video, learn Python Program to Find Armstrong Number in an Interval - Complete Guide. Find all the videos of the 100+ Python Programs Course in this playlist: • Python Program to Add ...
    💎 Get Access to Premium Videos and Live Streams: / @wscubetech
    WsCube Tech is a leading Web, Mobile App & Digital Marketing company, and institute in India.
    We help businesses of all sizes to build their online presence, grow their business, and reach new heights.
    👉For Digital Marketing services (Brand Building, SEO, SMO, PPC, SEM, Content Writing), Web Development and App Development solutions, visit our website: www.wscubetech...
    👉Want to learn new skills and improve existing ones with in-depth and practical sessions? Enroll in our advanced online courses now and make yourself job-ready: courses.wscube...
    All the courses are job-oriented, up-to-date with the latest algorithms and modules, fully practical, and provide you hands-on projects.
    👉 Want to learn and acquire skills in English? Visit WsCube Tech English channel: bit.ly/2M3oYOs
    📞 For more info about the courses, call us: +91-7878985501, +91-9269698122
    ✅ CONNECT WITH THE FOUNDER (Mr. Kushagra Bhatia) -
    👉 Instagram - / kushagrabhatiaofficial
    👉 LinkedIn - / kushagra-bhatia
    Connect with WsCube Tech on social media for the latest offers, promos, job vacancies, and much more:
    ► Subscribe: bit.ly/wscubech...
    ► Facebook: / wscubetech.india
    ► Twitter: / wscubetechindia
    ► Instagram: / wscubetechindia
    ► LinkedIn : / wscubetechindia
    ► UA-cam: / wscubetechjodhpur
    ► Website: wscubetech.com
    -------------------------------------| Thanks |--------------------------
    #python #pythonprogramming #pythontutorials

КОМЕНТАРІ • 20

  • @wscubetech
    @wscubetech  2 роки тому

    😎Hey, thanks for watching! We’d love to know your thoughts/doubts here in the comments.
    👉For professional self-paced certification courses (pre-recorded), visit: bit.ly/Pre-Recorded-Course
    👉Don’t forget to SUBSCRIBE to our channel for more such videos & valuable content: bit.ly/UA-cam-WsCubeTech

  • @UmeshKumar-uy6we
    @UmeshKumar-uy6we 9 місяців тому +2

    def armstrong_number(number):
    alpha=sum(int(item)**len(str(number))for item in str(number))
    return alpha
    def armstrong_sum_in_an_interval(a,b):
    armstrong_number_int = []
    for i in range(a,b+1):
    if armstrong_number(i) == i:
    armstrong_number_int.append(i)
    return(armstrong_number_int)
    # case for finding in interval (25,134)
    print(f"armstrong in given interval is:{armstrong_sum_in_an_interval(25,154)}")

  • @rockyharrison8881
    @rockyharrison8881 Рік тому +2

    Thank you so much for this video 📸

  • @SerendipitySage29
    @SerendipitySage29 Рік тому +6

    but what if the range is from 1 to 1000 , its showing 1 to 9 in the output?

  • @TravelandTell
    @TravelandTell 2 роки тому +2

    Ver Helpful........Thanks for sharing....big like 43

  • @minecraftkhanboy3738
    @minecraftkhanboy3738 2 роки тому +1

    Sir payload ko phone m kaise copy kre

  • @shortsgaming9337
    @shortsgaming9337 2 роки тому

    Nice video Dedi

  • @sscode3809
    @sscode3809 2 роки тому +1

    Mam python me ek function ke aunder kitne function define kar sakate hai please tell me

  • @__Atif_7190
    @__Atif_7190 Рік тому +2

    Mam but 1 to upper print kar rahe hai tou tou 1 to 9 bhi print hu rahe hai but 1 to 9 is not an Armstrong number??

    • @snewkid9590
      @snewkid9590 Рік тому +1

      The above code is not well structured , use this:
      def is_armstrong(number):
      num_str = str(number)
      num_digits = len(num_str)
      armstrong_sum = sum(int(digit) ** num_digits for digit in num_str)
      return armstrong_sum == number
      def print_armstrong_numbers_in_range(start, end):
      print(f"Armstrong numbers between {start} and {end}:")
      for num in range(start, end + 1):
      if is_armstrong(num):
      print(num)
      start_range = int(input("Enter the start of the range: "))
      end_range = int(input("Enter the end of the range: "))
      print_armstrong_numbers_in_range(start_range, end_range)

    • @rehanclasher115
      @rehanclasher115 10 місяців тому

      One to nine are also called armstrong numbers dude

    • @__Atif_7190
      @__Atif_7190 10 місяців тому

      @@rehanclasher115 Yes brother you are right 👍

  • @puneetraghavable
    @puneetraghavable 2 роки тому

    Sir devops ke lie video bnao from bigning

  • @soniskc2545
    @soniskc2545 Місяць тому

    1 is armstrong number or not?

  • @ankurgupta6124
    @ankurgupta6124 5 місяців тому

    m getting the outputs like 125, 153 ,216, 371, 729 for same code
    lower = int(input('Enter the lower limit:'))
    upper = int(input('Enter the upper limit:'))
    for num in range(lower, upper+1):
    order = len(str(num))
    sum = 0
    temp = num
    while temp>0:
    digit = temp%10
    sum = sum+digit**order
    temp//=10
    if num == sum:
    print(num)

  • @akashkhan5264
    @akashkhan5264 2 роки тому

    First like me bro

  • @shoaib4x533
    @shoaib4x533 10 місяців тому

    Kachra h. Bro

  • @SagnikDas-fb4st
    @SagnikDas-fb4st 9 місяців тому

    Thik bujhlam na didi

  • @GoogleAndroidSmart
    @GoogleAndroidSmart 2 роки тому

    💅💅💅💅💅💅💅💅💅