use truncating division

This commit is contained in:
xenofem 2020-06-26 17:51:49 -04:00
parent e73c66c679
commit 4cbe72c8e5

View file

@ -15,7 +15,7 @@ def matchings(l):
result = []
for i in range(len(l)):
matching = [(center, l[i])]
for j in range(1, (len(l)-1)/2 + 1):
for j in range(1, (len(l)-1)//2 + 1):
matching.append((l[(i-j)%len(l)], l[(i+j)%len(l)]))
result.append(matching)
return result
@ -88,7 +88,7 @@ async def on_message(message):
pollination_channels = []
channel_names = config['channel_names'].copy()
exception_count = 0
while len(pollination_channels) < len(participants)/2:
while len(pollination_channels) < len(participants)//2:
if len(channel_names) > 0:
name = channel_names.pop(0)
else: