Files
pythonChallenge/lvl4.py
2021-02-20 01:01:03 -05:00

20 lines
519 B
Python

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)