Welcome to Interactive Programming Forums, where you can ask questions, receive answers from other members of the community, post code snippets and post exercies.

string Error

+2 votes
here is the exercise
Examine and try out the following code:
str="Hello World"; print str;

here is my answer
str="Hello World"
print str ========> Error
print "str"========>Error

and what you suspect me to print???
posted 6 years ago in Python by elrachyd (1,500 points)

2 Answers

0 votes

We have singleline and multiline exercises.
It looks like you tried a singleline exercise using multilines.
Please retry the code using just a single line like below:

>>> str="Hello World"; print str;
Hello World
answered 6 years ago by codeadmin (113,880 points)
0 votes
hello world..
which python version do you use?
if python 3.2 =

str="Hello World"; str  ;
answered 6 years ago by masonjr (910 points)

Related questions

+4 votes
1 answer
posted 6 years ago in Python by Manuel Pacheco (1,280 points)
+7 votes
1 answer
–1 vote
1 answer
posted 5 years ago in SQL by SUNRISER (2,050 points)
0 votes
0 answers
posted 2 years ago in Python by ladayton69 (7,080 points)