Needing help!

I am a brand new python learner and need help on this example!

x = "Hello"
y = "World"
print x + y

I’m being asked to put a space between Hello and World in order to separate the two words when printed. My thought process was to add a physical space before World like so: " world" but that failed me.

Any help?

that should work, is this on your own or a exercise? If its an exercise, it might desire the space after hello

hey there! yes an exercise. I tried both ways and nothing has worked so far :confused: could be a glitch in the exercise i’m using

What exercise are you doing/using? Can you share it with us? Is it a codecademy exercise?

It is! it’s the “Teaching yourself python” lesson and I am on math and strings where it asks you to print x + y as “Hello World”


x = "hello"
y = " world"
print x + y

this is what I have! I have tried doing the space after "hello " as well with no luck…

Please just give me the exercise url, that is easier

the code you posted didn’t include that you added the spaces within the hello string

that course is longer supported, i really recommend upgrading to the supported python course:

will do! thank you. So the space should work then? Just wanting to make sure I was at least doing it correctly.


yes, it would normally work. Also, note that Hello and World both start with an uppercase letter.

it seems the only way to pass is to do something like:

x = "Hello"
y = "World"
print "%s %s" % (x, y)

its weird, the exercise checks that the value of x is Hello and the value of y is World. So, you need an alternative way to get the space in, given we can’t add it to the variables

but continuing this course will very likely mean running into more bugs, so change to the new course