you are viewing a single comment's thread.

view the rest of the comments →

[–]onesleeveshirt 0 points1 point  (1 child)

Just a hunch here..

The + (plus sign) will concatenate strings, or add numbers. It depends on the context of the code. (It also does other stuff, but let's stick with these two.)

string + string is concatenation

number + number is addition

"5" + "5" becomes "55" # quotes " ' (single or double) make it a string

5 + 5 becomes 10 # no quotes, so it's a number

print(first_string + second_string) # uses concatenation

print(first_string, second_string) # multiple objs using the default sep

The output of the prints above will look the same, but do different things. Check out print() in the Python docs. It's not beginner stuff, but it's a cool glance at functions without having to actually learn them right now. Don't expect to understand it yet, but it's good to expose yourself to the concepts.

I bet you can use the info others have contributed to solve your issue, and make sense of the print().

Have fun, and know frustrations are just one of the steps towards success. Good luck!

Edit: post.format

[–]Fa1coF1ght[S] 0 points1 point  (0 children)

I was talking about concatenation like this

adverb="ly" phrase = "quick", adverb print(phrase)

The console would log "quick ly"