Hi, I would like to ask a question, I'm trying to create a while loop, I'm trying to make the program to recognize string characters, but when finally I found a way to do it now it doesn't recognize negative numbers.
Here´s the code, hopefully with some feedback I can correct the issue.
r = raw_input ("enter a number:")
if r.isdigit() and int(r):
print r
while r != 0:
print r
if r > 0:
r = int(r)-1
elif r < 0:
r = int(r)+1
else:
print "enter a valid numeric value"

Hey! We 've verified this expert answer for you, click below to unlock the details :)

I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!

hey ,which language is this code ?

Looking for something else?

Not the answer you are looking for? Search for more explanations.

## More answers

Looking for something else?

Not the answer you are looking for? Search for more explanations.