Because who needs socks, really?
# The Algorithm
if socks_in_time == 6.2:
print("You have 6.2 socks in the wash.")
elif socks_in-time < 6.2:
print("You need more socks in the wash.")
else:
print("You have too many socks in the wash.")
# Sock Sorting Algorithm def sort_socks(socks): socks.sort() return socks
# Sock Pairing Algorithm def find_pairing(socks): for i in range(0, len(socks)-1): if socks[i] == socks[i+1]: return 1 return 0
Because 6.2 socks are the optimal number to have in the wash, we've created an algorithm to help you achieve this perfect balance.
But don't just take our word for it! Try out our simulation to see for yourself.