Interactive Programming Forums
Login
Register
Home
Questions/Snippets/Exercises
Unanswered
Tags
Ask a Question
Post a Code Snippet
Post an Exercise
Welcome to Interactive Programming Forums, where you can ask questions, receive answers from other members of the community, post code snippets and post exercies.
All categories
Ruby
(3)
Python
(10)
PHP
(7)
Perl
(2)
SQL
(8)
Javascript
(6)
HTML
(20)
CSS
(4)
jQuery
(0)
XML
(3)
Code Snippets
(1)
Exercises
(4)
Other
(9)
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
print("str")=======>Error
print "str"========>Error
Why????????????????
and what you suspect me to print???
python
posted
12 years
ago
in
Python
by
elrachyd
(
1,500
points)
2 Answers
0
votes
Hi,
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
12 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
12 years
ago
by
masonjr
(
910
points)
Related questions
+1
vote
0
answers
no module name sandbox why this error message?
posted
6 years
ago
in
Python
by
(
1,740
points)
+4
votes
1
answer
Python Code Error
posted
12 years
ago
in
Python
by
Manuel Pacheco
(
1,280
points)
python-programming-code
error
+7
votes
1
answer
error in sql exercise Chapter IV - CREATE TABLE 'Employees';
posted
12 years
ago
in
SQL
by
SUNRISER
(
2,050
points)
sql
error
programming-code
0
votes
1
answer
Warning: array_combine() expects parameter 1 to be array, null given - = - and other error: Undefined variable: mixed
posted
12 years
ago
in
PHP
by
SUNRISER
(
2,050
points)
php
programming-code
error
–1
vote
1
answer
error in sql exercise Chapter IV - DESCRIBE Employees;
posted
12 years
ago
in
SQL
by
SUNRISER
(
2,050
points)
sql
programming-code
error