-24

I have a question about my Stack Overflow question: Use a variable from a list instead of the value in a conditional statement

Why was this question downvoted? I did my best to explain my problem which I was not able to find on the Internet. If you try the code I wrote, you'll probably understand the error with my code.

9
  • 3
    Just ignore and let it go, you will get used to it. But ask better quality questions which include making sure your question is a minimum reproducible example to make it easier for others to help you. Downvotes help the system coerce contributors to format their questions clearer for future vsitors and quicker solutions.
    – Dong Li
    Dec 21, 2021 at 6:36
  • Yes thank you, I'm already trying my best to explain the best in the least words, I hope I will get used to it soon, at first I thought for no reason that if my question is being down voted, it will stop being recommended to others and I wont get new answers or solutions. Dec 21, 2021 at 6:53
  • No if you get downvoted for a series of posts then I think the system has a mechanism for detecting that the community is not receiving your questions so well and starts limiting the number of questions you can ask in a week and so on and so forth.
    – Dong Li
    Dec 21, 2021 at 6:56
  • Yes, I realized that. Thank you. Dec 21, 2021 at 8:31
  • 11
    "I did my best" doesn't matter. "because I'm not good at explaining" So why are you surprised your post got a downvote? PS Please research before considering posting a question (like this one).
    – philipxy
    Dec 21, 2021 at 8:33
  • 17
    People cannot provide solutions to questions that they cannot understand. Neither can other people benefit from questions that they cannot understand. Such questions just are not useful, and will thus often be downvoted. That there is a reason why the question is in this state doesn't change that it is in this state. Dec 21, 2021 at 8:36
  • 15
    "I did my best...". Not once did you edit the question with any of the clarifications asked for. How can that be your best?
    – charlietfl
    Dec 21, 2021 at 11:45
  • We shouldn’t have to run your code to understand what the error is, you should make that clear, the code is there so we can debug the code if we believe we know what’s wrong with the code Dec 21, 2021 at 13:42
  • 1
    And it's been more than 12 hours since you asked this question, but you still haven't edited the original question -- which begs the question of why not? Dec 21, 2021 at 21:08

2 Answers 2

11

Your question only has one downvote and it's only an hour old.

I don't use Python too often, but it's not entirely clear to me what you're asking. Your code is fairly trivial and easy to understand, but it isn't clear what your desired outcome is.

The first comment on your question explains the issue:

I'm not entirely sure what you're trying to accomplish here. Is the user supposed to type something and it will change the value of the first item in the list? Or something else?

Have a read of the how to ask page, and edit your question to clarify what specifically your desired output is.

3
  • thanks, but I'm not sure how to explain the code :( every thing I can say about my code, I said in the comments too. Dec 21, 2021 at 6:49
  • 24
    @SuryanshsinhSisodiya every thing I can say about my code, I said in the comments too It is preferred to edit additional information into your question instead of putting it in comments. Dec 21, 2021 at 8:25
  • 1
    In the comments, but NOT, in the question body. Dec 21, 2021 at 13:43
3

The problem is that you're trying to explain your code, and what your code is not doing/doing wrong.

What people need so they can help you, is for you to explain what problem you're trying to solve, and then share the code you've made as an attempt to solve such problem.

E.g. instead of asking

When I type '6' as an input value my code loops infinitely; how can I solve this?

you should probably ask*:

I'm making a program that receives input numbers from the user, and then it checks if the number already exists on a list; if it doesn't exist, it inserts it into an array, but if it exists, it prompts a message 'number already exists' and asks for another number. But when I enter 6 as an input value the program just loops infinitely.

*This is just a made-up example. In NO WAY am I saying this is exactly how you should phrase your specific question.


As a specific example of what's wrong with your question: reading your comments, it is inferred that you're making a sudoku game, and that what you're trying to accomplish is to allow the user to input a value as long as the value is not already on a specific area/zone of the puzzle. But there's NOTHING in your question that makes someone think you're trying to make a sudoku game, and that the problem you're trying to solve is to accept guesses from the user. If that's truly the case of your problem, both of those pieces of information are crucial for your question to be answerable.

Not the answer you're looking for? Browse other questions tagged .