more levels

This commit is contained in:
dan
2021-02-20 01:01:03 -05:00
parent 8514b4e6ab
commit 18118951e3
4 changed files with 2354 additions and 0 deletions

19
lvl4.py Normal file
View 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)