Skip to content

Instantly share code, notes, and snippets.

@Mitmischer
Created December 3, 2012 18:10
Show Gist options
  • Save Mitmischer/4196798 to your computer and use it in GitHub Desktop.
Save Mitmischer/4196798 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
while True:
#x = int ( input("1 <= x <= 65535 ?:") )
#print("Wert an Stelle x="+str(x) + ": " + getSolutionFor(x))
# Einleseschleife
lowerBound = -1
upperBound = -1
while True:
lowerBound = int(input("von :?"))
upperBound = int(input("bis :?"))
if not(upperBound <= lowerBound or upperBound >= 65535 or lowerBound < 0):
break;
for i in range (lowerBound, upperBound+1):
print(getSolutionFor(i))
@lhk
Copy link

lhk commented Dec 3, 2012

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):
print(getSolutionFor(i))

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