Skip to content

Instantly share code, notes, and snippets.

@qguv
Created October 2, 2011 07:37
Show Gist options
  • Save qguv/1257195 to your computer and use it in GitHub Desktop.
Save qguv/1257195 to your computer and use it in GitHub Desktop.
This is a simple program to calculate the last intelligible 70% of any string of text, also known as Wadsworth's Constant
#! /bin/python
print "Wadsworth's Constant"
theString = raw_input('] ')
theStringLength = len(theString)
WadsworthsAmount = int(round((0.3) * theStringLength))
firstSpace = theString.find(' ', WadsworthsAmount)
if firstSpace == -1:
FinalString = theString[WadsworthsAmount:]
else:
FinalString = theString[firstSpace+1:]
print FinalString
@jabbalaci
Copy link

@aelse
No, but it chops off the first 30% of any text.

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