Ask your own question, for FREE!
Computer Science 17 Online
OpenStudy (anonymous):

how to use raw input cammand on python

OpenStudy (owlfred):

Hoot! You just asked your first question! Hang tight while I find people to answer it for you. You can thank people who give you good answers by clicking the 'Good Answer' button on the right!

OpenStudy (anonymous):

name=raw_input("Name:") print name or use try: no=int(raw_input("Enter a no:")) print no except ValueError: print "It should be integer no" python filename.py

OpenStudy (anonymous):

Traceback (most recent call last): File "D:/learn python/raw.py", line 1, in <module> name=raw_input("Name:") NameError: name 'raw_input' is not defined

OpenStudy (anonymous):

You have to use input() since it is 3.2 vrsion

OpenStudy (anonymous):

Or if you are working with some code that uses raw_input already you can just type: raw_input = input At the top of your file.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!