numWurf = 2 n = 6**numWurf s = 0 for w in range(1,7): s+=w*(w**numWurf-(w-1)**numWurf) print("Durchschnitt exakt %d/%d ~ %f" % (s,n,s/n))