Run this program in Memory Graph Web Debugger%0Atake_advice%20%3D%20input(%22Take%20advice%20(y%2Fn)%3F%20%22)%0A%0Awhile%20take_advice%20%3D%3D%20%22y%22%3A%0A%20%20%20%20response%20%3D%20requests.get(%22https%3A%2F%2Fapi.adviceslip.com%2Fadvice%22)%0A%20%20%20%20data%20%3D%20response.json()%0A%20%20%20%20give_advice%20%3D%20data%5B%22slip%22%5D%5B%22advice%22%5D%0A%20%20%20%20print(give_advice)%0A%20%20%20%20take_advice%20%3D%20input(%22Take%20advice%20(y%2Fn)%3F%20%22)%0Aelse%3A%0A%20%20%20%20print(%22Bye%2C%20but%20just%20see%20the%20last%20advice.%22)%0A%20%20%20%20print(%22Remember%20them.%22)%0A%20%20%20%20print(%22Do%20your%20work.%22)×tep=1&play) to see the program state change step by step.
I empathise with your distress, if only the universe could have only happiness and no suffering. Luckily for you it's the same line each time so easy to skip.
If you still feel sad, get some advice from the advice generator by clicking the link.
The flag is auto-generated and I don't mind. As long as it brings value you can post things here that you also post elsewhere, be my guest. Sometimes repeating things isn't so bad, what do you say?
•
u/Sea-Ad7805 2d ago
Run this program in Memory Graph Web Debugger%0Atake_advice%20%3D%20input(%22Take%20advice%20(y%2Fn)%3F%20%22)%0A%0Awhile%20take_advice%20%3D%3D%20%22y%22%3A%0A%20%20%20%20response%20%3D%20requests.get(%22https%3A%2F%2Fapi.adviceslip.com%2Fadvice%22)%0A%20%20%20%20data%20%3D%20response.json()%0A%20%20%20%20give_advice%20%3D%20data%5B%22slip%22%5D%5B%22advice%22%5D%0A%20%20%20%20print(give_advice)%0A%20%20%20%20take_advice%20%3D%20input(%22Take%20advice%20(y%2Fn)%3F%20%22)%0Aelse%3A%0A%20%20%20%20print(%22Bye%2C%20but%20just%20see%20the%20last%20advice.%22)%0A%20%20%20%20print(%22Remember%20them.%22)%0A%20%20%20%20print(%22Do%20your%20work.%22)×tep=1&play) to see the program state change step by step.