omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. lyubomyr83
    3. Best

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 18
    • Best 2
    • Controversial 0
    • Groups 0

    Best posts made by lyubomyr83

    • RE: Function for recognize quantity of unique combinations

      @mikael
      Max - variable count to, for example 100.
      So i need count quantity uniques examples for some mathematic operator, in my case '+' or '-'
      I can't have example 98+10 or 25-50
      Max example result must be under 100 or equal
      Minimum example result must be under 0

      posted in Pythonista
      lyubomyr83
      lyubomyr83
    • Function for recognize quantity of unique combinations

      Hello pythonista community. Can someone adwise me formula for recognize quantity of unique combinations when you count to some max digit with sign "-" (minus)? Answer can't be under zero.

      Example1:
      sign = '-'
      max = 2
      2-2
      2-1
      1-1

      • we have only three unique combinations.

      Example2:
      answer can't be upper max:
      max = 2
      1+1

      • we have only one unique example.

      I already have formula for two signs "+-": unic_col=max**2

      But i need formula for '+' and '-'
      And maybe someone know for:
      +-×
      +-/
      +-×/
      /×

      So, i need function like that:

      def uniques_col(operators, max):
      if operators == '+-':
      return max**2
      elif operators == '+':
      return .....
      elif operators == '-':
      return .....
      elif operators == '+-×':
      return .....
      ......

      posted in Pythonista
      lyubomyr83
      lyubomyr83