There's a balance between providing enough information to describe your problem, and providing too much information such that it's impossible to see where the problem is. That's why one of the common close reasons contains a link to how to write a Minimal, Complete, and Verifiable example.
The two questions you point out had different flaws in them that caused them to be downvoted. The first question looked like this in its original incarnation:
Knight's Tour in python
matrix=[] r=9 for i in range(r):
innerrow=[]
for j in range(r):
innerrow.append(-1)
matrix.append(innerrow)
def reset():
for i in range(r):
innerrow=[]
for j in range(r):
innerrow.append(-1)
matrix.append(innerrow)
mov=[[2,1],[2,-1],[-2,1],[-2,-1],[1,2],[1,-2],[-1,2],[-1,-2]] count=0
def poss(x,y):
if 0<= x < r and 0 <= y < r and matrix[x][y] == -1:
return True
return False
def displace(x,y,cnt):
if cnt == r*r:
return True
for i in range(len(mov)):
m = x +mov[i][0]
n = y + movi
if poss(m, n):
matrix[m][n]=cnt
if displace(m, n,cnt+1):
return True
else:
matrix[m][n] = -1
return False
matrix[0][0]=0 if displace(0,0,1)==True:
print matrix
print "\n"
There was no problem statement, no text, and no question at all. There was no way anyone could answer that. It was downvoted and closed. Then, the asker edited it into an actual question and the community reopened it. I'd say that process worked well.
The second question is also hard to understand. A title of "UVa online judge 10484" makes no sense to most people, and only because I've seen quite a few students post these do I recognize that it's referring to the University of Virginia's computer science program and an online code verifier. Unless you're a student at UVa, that's not a helpful description.
Beyond that, they just say this:
I complied the code and it works fine on my side, but when i upload
the code, it returns runtime error on the online judge.
I can't find where the error is, so I would be grateful for any help.
No other information is provided, so we don't know what kind of "runtime error" they saw, where it occurred, or any other information about this problem. They're now asking volunteers to look through every line of their code to see if they can spot an error. Most of us don't feel that's an effective use of our time.
Yes, we do want people to provide as much detail as they can, but we do want the information in questions to be narrowed down to the core of the problem. It's not just how much information is presented in a question, but that it's the right kind of information.
"I can't find where the error is" + wall of text = no one wants to answer