Mahesh N wrote: > I dun understand the mistake. My aim is to accept an integer number. > The python lookup in IDLE asks for a string object but the interpreter > returns with the following error message. Some one pls explain. > Thank You > > PS : I understand that i can do type conversion after getting input > thru raw_input(). But how does input() function work?
Did you read this? http://docs.python.org/lib/built-in-funcs.html#l2h-40 What do you not understand about it? > > >>> prompt="temme a number\n" > >>> speed =input(prompt) > > Traceback (most recent call last): > File "<pyshell#56>", line 1, in <module> > speed =input(prompt) > TypeError: 'str' object is not callable > >>> speed =input("temme a number\n") > > Traceback (most recent call last): > File "<pyshell#57>", line 1, in <module> > speed =input("temme a number\n") > TypeError: 'str' object is not callable > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor