Skip to content

Instantly share code, notes, and snippets.

@coffeemakr
Last active October 14, 2018 09:04
Show Gist options
  • Save coffeemakr/4293e907b23141fa4b71 to your computer and use it in GitHub Desktop.
Save coffeemakr/4293e907b23141fa4b71 to your computer and use it in GitHub Desktop.
Pharmacode (Laetus) calculation script
#!/bin/env python
import sys
def pharmacode(v):
r = ''
while v:
t = 1 - ( v % 2 )
r = str(t) + r
v = (v - t) / 2
return r
if __name__ == '__main__':
print(pharmacode(int(sys.argv[1])))
@rajuchinnu
Copy link

how to calculate the pharmacode value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment