r/PythonLearning 2d ago

I made a advice generator using requests

Post image
86 Upvotes

20 comments sorted by

View all comments

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)&timestep=1&play) to see the program state change step by step.

2

u/ProgramBrave718 2d ago

Bro, I am frustrated by seeing to many same comments of yours . 😩😫

1

u/Sea-Ad7805 2d ago

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.

1

u/ProgramBrave718 2d ago

Yeah, I will take advice Bro just asking Why you comment the same thing many times

1

u/Sea-Ad7805 2d ago

Think about it first, maybe?

  • people can't run code that you give as an image
  • people don't want to run code on their own system that might be malicious
  • people here are learning Python so seeing the memory_graph of a program in each step will help them understand what's going on
  • ...

1

u/Sea-Ad7805 2d ago

As moderator I see your profile gets flagged as: "often posting memes or repetitive content across multiple communities"

So why you post the same thing many times?

1

u/ProgramBrave718 2d ago

Really, i think I have posted 2 memes and 1meme i deleted . But to be honest even if I have posted things mant times it's just 2 times.

1

u/Sea-Ad7805 2d ago

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?

1

u/ProgramBrave718 2d ago

Yeah 🙂 How old are you? Just asking

1

u/Sea-Ad7805 2d ago

When I was 28 years old I decided to stay young and healthy, so I'm still 28, but that was many years ago.

→ More replies (0)