r/PythonLearning • u/Patient_Smoke_4236 • Aug 12 '25
Why not 4th!
In the fourth argument is the string "end1 ", then why is the correct answer the 1st one
This is a Codechef practice problem
4
4
u/LionZ_RDS Aug 12 '25
Were the answers specific designed with the font being easy to misread in mind? That’s not even testing your programming knowledge
2
u/cafesito_asere Aug 12 '25
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.
2
u/NaiveEscape1 Aug 12 '25
Can anyone please tell me why it printed 5, isn’t that a integer data type as its not in quotes?
1
u/No_Cook_2493 Aug 12 '25
You can print integer data types in python. Print("number ",5) will output number 5 in the console
1
u/Temporary_Pie2733 Aug 12 '25
writemethod, except it does a lot of processing of its arguments to produce the singlestrvalue expected bywrite. Part of that processing is to convert any non-strvalue to astrusing its__str__method.
2
u/ninhaomah Aug 12 '25
Why do you think it's end1 ?
l in Hello and the "l" character in endl looks the same , no ?
1
u/textBasedUI Aug 12 '25
That’s an evil challenge if I was new and failed that I would be dismotivated forever
1
1
1
1
1
Aug 16 '25
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:
print("Hello world!" * 5)Or something similar.
6
u/ImBonVoyage Aug 12 '25
It’s a lowercase L. It’s the same character in hello and world.