in the code i had to define, the "list of numbers", as there was an error, but now, in the code, it runs , but it still has errors.
below is the code:
def GetGoodAnswer():
answer = raw_input('gimme a number: ')
# Now put in some code to make sure the number is not too big
# or too small, or some string that isn't even a number.
# keep making them enter a number until you get something valid
return ValidNumber
# Inside main...
listofnumbers = []
for i in range(0,19):
listofnumbers.append(GetGoodAnswer())
#print '*'*listofnumbers.(range(0,19)
when i run the code this how it looks, if you can help me out, see wht the problem is, also i need way to print, the asswer, i have print code, but i dont think that will work.
gimme a number: 5
Traceback (most recent call last):
File "C:\Users\ADNAN\Documents\imran work\list.py", line 19, in ?
listofnumbers.append(GetGoodAnswer())
File "C:\Users\ADNAN\Documents\imran work\list.py", line 13, in GetGoodAnswer
return ValidNumber
NameError: global name 'ValidNumber' is not defined