Respuesta :

I would expect it to output 5 to the screen. The plus sign is overloaded in most languages, put simpler it behaves in more than one way. This looks like Python 3.x. When given strings, the plus sign concatenates them:

print( "Hello " + "World" )
"Hello World"

When given numbers, the plus sign performs addition. When numbers and strings are mixed, an error occurs. The number needs to be converted to a string like:

print( str( 4 ) + "foo" )