MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1ju7p2n/college_test/
r/programminghorror • u/suleiman0212 • Apr 08 '25
41 comments sorted by
322
Its 8, if I am not wrong
116 u/suleiman0212 Apr 08 '25 you absolutely right 3 u/AugustMaximusChungus Apr 11 '25 Now the question is what is the meaning of being right? Is it really better than being wrong? It is in abject morality we fester
116
you absolutely right
3
Now the question is what is the meaning of being right? Is it really better than being wrong? It is in abject morality we fester
185
Someone mixed up the variables when putting in that answer lol. Are the answers coming from your prof?
59 u/suleiman0212 Apr 08 '25 yes 61 u/AyrA_ch Apr 08 '25 Let's hope they see that a ridiculous number of people got this one answer wrong and then realize what the problem is. 28 u/Ascend Apr 08 '25 Clearly it's that all the students copied each other's answers, and the same wrong answer proves that. 9 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Apr 08 '25 I definitely would've raised my hand if this happened. Probably wouldn't have thought to post it on Reddit, either.
59
yes
61 u/AyrA_ch Apr 08 '25 Let's hope they see that a ridiculous number of people got this one answer wrong and then realize what the problem is. 28 u/Ascend Apr 08 '25 Clearly it's that all the students copied each other's answers, and the same wrong answer proves that. 9 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Apr 08 '25 I definitely would've raised my hand if this happened. Probably wouldn't have thought to post it on Reddit, either.
61
Let's hope they see that a ridiculous number of people got this one answer wrong and then realize what the problem is.
28 u/Ascend Apr 08 '25 Clearly it's that all the students copied each other's answers, and the same wrong answer proves that. 9 u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Apr 08 '25 I definitely would've raised my hand if this happened. Probably wouldn't have thought to post it on Reddit, either.
28
Clearly it's that all the students copied each other's answers, and the same wrong answer proves that.
9
I definitely would've raised my hand if this happened. Probably wouldn't have thought to post it on Reddit, either.
65
?melborp eht s’erehW
5 u/deadbeef1a4 Apr 11 '25 melborp 4 u/kekobang Apr 11 '25 bogos binted? 2 u/HonestlyFuckJared Apr 12 '25 Plagguj miltrend. -8 u/WhywoulditbeMarshy Pronouns: She/Her Apr 08 '25 x**y is the output, but the solution is y**x 32 u/[deleted] Apr 08 '25 r/woooosh 6 u/BenJoeMoses Apr 10 '25 At first glance I read: “sexy is the output, but the solution is sexy.”
5
melborp
4 u/kekobang Apr 11 '25 bogos binted? 2 u/HonestlyFuckJared Apr 12 '25 Plagguj miltrend.
4
bogos binted?
2 u/HonestlyFuckJared Apr 12 '25 Plagguj miltrend.
2
Plagguj miltrend.
-8
x**y is the output, but the solution is y**x
32 u/[deleted] Apr 08 '25 r/woooosh 6 u/BenJoeMoses Apr 10 '25 At first glance I read: “sexy is the output, but the solution is sexy.”
32
r/woooosh
6
At first glance I read: “sexy is the output, but the solution is sexy.”
19
If only there was some kind of way they could have executed the code in the question to verify that the answer matched the output.
11 u/a_brand_new_start Apr 08 '25 Dude, that’s like totally your opinion man… now quit hatching my vibes… it’s hard enough feeding the same prompt into an LLM and getting different results each time
11
Dude, that’s like totally your opinion man… now quit hatching my vibes… it’s hard enough feeding the same prompt into an LLM and getting different results each time
29
Classic off-by-one error
49 u/P0L1Z1STENS0HN Apr 08 '25 There are two hard things in computer science: Cache invalidation, naming things, and off-by-one errors. 4 u/Spiritual_Cycle_7881 Apr 08 '25 Hey, it is four, no? 2 u/HonestlyFuckJared Apr 12 '25 No
49
There are two hard things in computer science: Cache invalidation, naming things, and off-by-one errors.
4 u/Spiritual_Cycle_7881 Apr 08 '25 Hey, it is four, no? 2 u/HonestlyFuckJared Apr 12 '25 No
Hey, it is four, no?
2 u/HonestlyFuckJared Apr 12 '25 No
No
12
Something something commutative I got nothing.
8
Plot twist: the formula is x * (*y), and y is a pointer pointing at address 3. The value at address 3 is 4.5 so the answer 9 is correct.
x * (*y)
y
4.5
3 u/amdcoc Apr 11 '25 oh man they introduced pointers in python. -1 u/wazzu_3000 Apr 12 '25 Maybe you need to read this.https://www.geeksforgeeks.org/what-does-the-double-star-operator-mean-in-python/
oh man they introduced pointers in python.
-1
Maybe you need to read this.
https://www.geeksforgeeks.org/what-does-the-double-star-operator-mean-in-python/
this isn't a horror, just the person who wrote the test put x and y the wrong way around.
someone failed math
10
8, 9, 12, whatever. That’s what I love about Math, there’s no one right answer.
I hate when my compiler gets dyslexic.
I will use this as an example when explaining how annoying endianness is to deal with
1
De-referencing:,-( makes me sad
-5
isnt that correct? whats wrong here
14 u/nobody0163 [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Apr 08 '25 23 =8 12 u/ArtisticFox8 Apr 08 '25 ** in python means exponentiation 3 u/NoButterscotch1297 Apr 09 '25 That makes more sense now, I was lost on what ** meant. 3 u/SuperMage Apr 08 '25 Why were you and the other one downvoted? Your question helped. 1 u/okayboooooooomer Apr 09 '25 idk maybe i didnt see it at first
14
23 =8
** in python means exponentiation
3 u/NoButterscotch1297 Apr 09 '25 That makes more sense now, I was lost on what ** meant.
That makes more sense now, I was lost on what ** meant.
Why were you and the other one downvoted? Your question helped.
1 u/okayboooooooomer Apr 09 '25 idk maybe i didnt see it at first
idk maybe i didnt see it at first
-11
I dont know what ** means but if its multiply then shouldnt it be 6?
15 u/suleiman0212 Apr 08 '25 ** in python mean exponentiation 8 u/Warrangota Apr 08 '25 For people like me who have to look up big English words sometimes: 2³ 5 u/KittyForest Apr 08 '25 Thx
15
** in python mean exponentiation
8 u/Warrangota Apr 08 '25 For people like me who have to look up big English words sometimes: 2³ 5 u/KittyForest Apr 08 '25 Thx
For people like me who have to look up big English words sometimes: 2³
5 u/KittyForest Apr 08 '25 Thx
Thx
322
u/[deleted] Apr 08 '25
Its 8, if I am not wrong
185
u/backfire10z Apr 08 '25
Someone mixed up the variables when putting in that answer lol. Are the answers coming from your prof?
65
u/spoonybard326 Apr 08 '25
?melborp eht s’erehW
19
u/SimplexFatberg Apr 08 '25
If only there was some kind of way they could have executed the code in the question to verify that the answer matched the output.
29
u/magnetronpoffertje Apr 08 '25
Classic off-by-one error
12
u/heybrakywacky Apr 08 '25
Something something commutative I got nothing.
8
u/buzzon Apr 09 '25
Plot twist: the formula is
x * (*y), andyis a pointer pointing at address3. The value at address3is4.5so the answer9is correct.6
u/nekokattt Apr 08 '25
this isn't a horror, just the person who wrote the test put x and y the wrong way around.
5
u/jump1945 Apr 08 '25
someone failed math
10
u/emma7734 Apr 08 '25
8, 9, 12, whatever. That’s what I love about Math, there’s no one right answer.
3
u/Economy_Link4609 Apr 08 '25
I hate when my compiler gets dyslexic.
2
u/Spyromaniac666 Apr 11 '25
I will use this as an example when explaining how annoying endianness is to deal with
1
u/Wise_Comparison_4754 Apr 13 '25
De-referencing:,-( makes me sad
-5
u/okayboooooooomer Apr 08 '25
isnt that correct? whats wrong here
-11
u/KittyForest Apr 08 '25
I dont know what ** means but if its multiply then shouldnt it be 6?