# take inputs
      num = int(input('Enter number: '))
      # find factor of number
      print('The factors of', num, 'are:')
      for i in range(1, num+1):
          if(num % i) == 0:
              print(i, end=' ')
      
      Python language logo

      Finding Factors

      beginner
      basicMaths

      To print the factors of a given number

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.