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

I've been getting a runtime error with the raw_input exercise. I've been racking my brain with these two sources of documentation. http://wiki.python.org/moin/SimplePrograms http://en.wikibooks.org/wiki/Python_Programming/Input_and_output Can someone be kind enough to give me a little insight as to what I'm doing wrong?

OpenStudy (espex):

What's your code look like?

OpenStudy (espex):

What version of Python?

OpenStudy (anonymous):

x = input('What is your name?\nPlease type your name here:') print 'Hello %s' % x

OpenStudy (anonymous):

Currently running Python 2.6.7

OpenStudy (espex):

You try putting parenthesis around your print statement? x = input('What is your name?\nPlease type your name here:') print ('Hello %s'% x)

OpenStudy (anonymous):

The code still doesn't work :-(

OpenStudy (espex):

x = raw_input('What is your name?\nPlease type your name here:') print 'Hello %s' % x What is your name? Please type your name here:slick Hello slick >>>

OpenStudy (espex):

Works in 2.7. It could be why they suggest that you use 2.7.5 in the exercises.

OpenStudy (anonymous):

Perfect! No more runtime :) Thank you very much eSpeX!

OpenStudy (espex):

You're welcome.

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!