+ 1
Am I Wrong or Is Pythonâs Training Exercise?
What about the space though? In the example they give before you do the exercise the program is written like so: >>> "Spam" + 'eggs' 'Spameggs' But in the other program for the exercise it says: >>> âHelloâ + âworldâ âHello worldâ No the extra space in between Hello and world isnât a typo thatâs how itâs written up. Could someone explain this to me?
4 Answers
+ 1
Hi Jake, I can tell you for a fact that the second command is definitely wrong.
If you don't recall exactly how it was given, one possibility is that the strings were not concatenated, instead passed as arguments to the print() function, like so:
print("Hello", 'world')
One more thing I noticed is that the characters around âHelloâ and âworldâ actually aren't the regular quotes, so that could be something.
+ 3
I have looked it up. There is a space after Hello inside the quotes.
0
Ok cool was jw, and Iâm ok with being wrong too đ. Constructive criticism is what I live for
0
Anytime!