Skip to content

Instantly share code, notes, and snippets.

@lhk
Forked from Mitmischer/gist:4196798
Created December 3, 2012 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save lhk/4196843 to your computer and use it in GitHub Desktop.
Save lhk/4196843 to your computer and use it in GitHub Desktop.
import urllib.request
def getSolutionFor(i):
f = urllib.request.urlopen('http://www.entwickler-ecke.de/files/eeags2012paranuss.php?q=' + str(i))
s = str(f.read())
return s.split('\'')[1]
def saveSolutionsToFile(lowerBound, upperBound, fileName):
pass
#x = int ( input("1 <= x <= 65535 ?:") )
#print("Wert an Stelle x="+str(x) + ": " + getSolutionFor(x))
# Einleseschleife
lowerBound = -1
upperBound = -1
lowerBound = int(input("von :?"))
upperBound = int(input("bis :?"))
if not(upperBound < lowerBound or upperBound >= 65534 or lowerBound < 1):
for i in range (lowerBound, upperBound+1):
print(getSolutionFor(i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment