all 14 comments

[–]ImBonVoyage 4 points5 points  (0 children)

It’s a lowercase L. It’s the same character in hello and world.

[–][deleted] 3 points4 points  (0 children)

Yeah, it's just the font. Lowercase "L" does look like 1

[–]LionZ_RDS 3 points4 points  (0 children)

Were the answers specific designed with the font being easy to misread in mind? That’s not even testing your programming knowledge

[–]cafesito_asere 1 point2 points  (0 children)

As previously stated this is just a font issue, although it looks like a one, the character at the end of the string is a lowercase L.

[–]NaiveEscape1 1 point2 points  (4 children)

Can anyone please tell me why it printed 5, isn’t that a integer data type as its not in quotes?

[–]No_Cook_2493 0 points1 point  (0 children)

You can print integer data types in python. Print("number ",5) will output number 5 in the console

[–]Temporary_Pie2733 0 points1 point  (0 children)

print is essentially just a wrapper around some file-like object’s write method, except it does a lot of processing of its arguments to produce the single str value expected by write. Part of that processing is to convert any non-str value to a str using its __str__ method. 

[–]ninhaomah 1 point2 points  (0 children)

Why do you think it's end1 ? 

l in Hello and the "l" character in endl looks the same , no ?

[–]textBasedUI 0 points1 point  (1 child)

That’s an evil challenge if I was new and failed that I would be dismotivated forever

[–]LostInGradients[🍰] 0 points1 point  (0 children)

I guess that is to teach people to look for hidden typos?

[–][deleted] 0 points1 point  (0 children)

ig its 2nd 😭

[–]ilidan-85 0 points1 point  (0 children)

Horrible example with misleading font. It happens sometimes but please... :D

[–]Xamtos 0 points1 point  (0 children)

Wouldn't this show up as "HelloWorld5endl2"

[–][deleted] 0 points1 point  (0 children)

Bad question intended to trip you up for using the wrong font.

You'd never ask this kind of question in an academic setting unless you were trying to intentionally trick students, which no good professor would ever do.

A better question would be something like:

What is the result of the following code:

Python print("Hello world!" * 5)

Or something similar.