• + 0 comments

    Python3:

    import fractions
    
    if __name__ == "__main__":
      count_all, count_sum6 = 0, 0
      for i in range(1,6+1):
        for j in range(1,6+1):
          count_all += 1
          if i != j and i + j == 6:
             count_sum6 += 1
            
      print(fractions.Fraction(count_sum6, count_all))