Convert probabilty.py to python3

This commit is contained in:
TKE
2020-05-04 15:08:54 +02:00
parent 71ba58ec4d
commit 6d0bb45fe4

View File

@@ -15,13 +15,13 @@ def main():
employees.append(0) employees.append(0)
count = 0 count = 0
for i in xrange(1, 1000001): for i in range(1, 1000001):
temp = employees[:] temp = employees[:]
shuffle(temp) shuffle(temp)
if Counter(temp[0:11])[1] == 4: if Counter(temp[0:11])[1] == 4:
count += 1 count += 1
print count / 1000000. print(count / 1000000.)
if __name__ == '__main__': if __name__ == '__main__':