more levels
This commit is contained in:
19
lvl4.py
Normal file
19
lvl4.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import requests
|
||||||
|
|
||||||
|
x = requests.get('http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=12345')
|
||||||
|
|
||||||
|
list = x.text.split()
|
||||||
|
print(list[-1])
|
||||||
|
|
||||||
|
while True:
|
||||||
|
if x.text != "Yes. Divide by two and keep going.":
|
||||||
|
x = requests.get('http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing='+list[-1])
|
||||||
|
|
||||||
|
list = x.text.split()
|
||||||
|
print("start ", x.text)
|
||||||
|
else:
|
||||||
|
div = 16044/2
|
||||||
|
x = requests.get('http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing='+str(div))
|
||||||
|
|
||||||
|
list = x.text.split()
|
||||||
|
print("next ", x.text)
|
||||||
Reference in New Issue
Block a user