Commit ffd64f34 authored by Thomas Fischer's avatar Thomas Fischer

Update 1-jar-of-pills_EN.py

parent ee857c2e
......@@ -35,7 +35,7 @@ for i in range(0, no_of_pills):
pills_before.append(pill)
shake=u'S H A K E '#.decode('utf-8')
colours_before = forms_before = colours_after = nachformen = ''
colours_before = forms_before = colours_after = afterforms = ''
pills_after = list(pills_before)
random.shuffle(pills_after)
print(' before after\n')
......@@ -50,12 +50,12 @@ for i in range(0, no_of_pills):
else:
colours_after+='0'
if pills_after[int(i/10)*10+j] == 'o' or pills_after[int(i/10)*10+j] == 'x':
nachformen += '1'
afterforms += '1'
else:
nachformen += '0'
afterforms += '0'
print()
colours_before += '1' if pills_before[i] == 'O' or pills_before[i] == 'o' else '0'
forms_before += '1' if pills_before[i] == 'o' or pills_before[i] == 'x' else '0'
print('\n'+u'\u0394'+' Complexity of colour distribution:',lz_complexity(colours_after)-lz_complexity(colours_before))
print(u'\u0394'+' Complexity of shape distribution:',lz_complexity(nachformen)-lz_complexity(forms_before),'\n')
print(u'\u0394'+' Complexity of shape distribution:',lz_complexity(afterforms)-lz_complexity(forms_before),'\n')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment