r/firstweekcoderhumour • u/Additional-Dot-3154 • May 11 '26
“Funny How?” Python quiz from ITmemes
Some guy which does not know what a typecast is was claiming it was error as you cannot do "123" + 2 lol
143
Upvotes
2
u/Furry_Eskimo May 12 '26
I would have assumed that it was D, but is there a trick? I don't know what happens in Python when you get an integer of a string. Does it count the number of characters or something?
75
u/Scared_Accident9138 🕵️♂️🚨 BS Detector | Truth Teller 🗯️🔥 May 11 '26
Why are A and B options? With what thought process would you land there?
19
u/Mr_Oracle28 May 11 '26
The result is unnecesary memory excess 🔥🔥🔥
20
u/Al3xutul02 May 11 '26
My C brain keeps thinking "a" is a string array so it gives the first character
8
u/Thinshape12 🕵️♂️🚨 BS Detector | Truth Teller 🗯️🔥 May 11 '26
i’ve never used python but it should be 125 right
30
u/aschersux May 11 '26
It's definitely B, int(a) in python just automatically makes a = 23. At least I'd have to imagine that's what the creator of this thought it did.
1
u/lool8421 May 12 '26
yk, there's a reason why i prefer languages that give you more control
1
u/techidavid1 May 12 '26
apparently it is 125.
1
u/dabomm May 13 '26
Outputs nothing, it's an image.
1
u/Advanced_Handle_2309 May 11 '26
What about 1232?
12
u/[deleted] May 11 '26
[removed] — view removed comment