summaryrefslogtreecommitdiff
path: root/mobile.py
diff options
context:
space:
mode:
Diffstat (limited to 'mobile.py')
-rwxr-xr-xmobile.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mobile.py b/mobile.py
index a0a83ed..481325c 100755
--- a/mobile.py
+++ b/mobile.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
+# getestet mit Python 2.7.8 und 3.4.2
'''Verteilt und gleicht ein Mobile aus'''
from math import floor
@@ -43,7 +44,7 @@ def weight(fig):
if len(fig) % 2 == 1:
# ist die Anzahl an Elementen ungerade,
# muss eines - hier das mittlerste - auf die Position 0
- middle = floor(len(fig) / 2)
+ middle = int(floor(len(fig) / 2))
res.append((0, fig[middle][1]))
del fig[middle]