• DeHuq2@lemmygrad.ml
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      8 months ago

      Fixed it now!

      def Fmmin():
          for n in range(2, number):
              if number % n == 0:
                  return n
              if n == number - 1 and number - 1 % n != 0:
                  return 0
      def Fmmax():
          for n in range(number-1, 1, -1):
              if number % n == 0:
                  return n
              if n == 2 and number % n != 0:
                  return 0