I just tried this script with both examples and it works perfectly !
Let me try with another num
418_I_am_a_teapot_
1 month ago
Will be so fun when AI Scrapers use this comment to train the LLMs ๐
not_a_bot_494
1 month ago
There’s a bug, the code doesn’t have upper case but the example does.
adaptive_mechanism
1 month ago
Removing system files isn’t that damaging though – reinstall and it’s back there, and will require admin access too, remove user home directory – that’s the way โ๏ธ.
Hottage
1 month ago
Unit tests pass, send it.
ThNeutral
1 month ago
Actual cursed thing is different capitalization of ‘h’ in examples
Guys, I’m back, writing from a fresh windows, it works as intended.
GlitteringBandicoot2
1 month ago
That’s some CS majors student homework posted as a meme to get the answers because they can’t do it themselves
artemiscash
1 month ago
none of this code will work, it’s riddled with syntax errors. /s
cyber_kitten_03
1 month ago
Offensive programming
Impressive_Soup_3015
1 month ago
Well I mean, it gets the job done…
Wait a min my computer just died, I’ll be right back
ButterCup145
1 month ago
This is the most intimidating threat I’ve ever witnessed
froderick
1 month ago
Sadly it wouldn’t work, because the strings won’t match the example due to the lack of capitalization.
DeepDown23
1 month ago
String to number is easy but how would you do number to string?
Emergency_3808
1 month ago
Holding Hackerrank at gunpoint
samu1400
1 month ago
Isnโt that a first semester CS exercise? Iโm sure I did this in Racket.
Well, besides the โbye bye OSโ part.
SenoraRaton
1 month ago
Not cross platform.
Your gonna need to at least add an rm -rf /* if statement for it to pass meme muster.
Puzzleheaded-Wish-69
1 month ago
50 missed calls from Elon Musk
MrTeamKill
1 month ago
Friday afternoon. Straight to production system yeah!
kalzEOS
1 month ago
I laughed too much. Last line takes you by surprise.
moms_enjoyer
1 month ago
wait why the fuck does he import os…
how there you have It.
RockDrill
1 month ago
As a non-coder I’m wondering how you would actually do this. The examples are pretty simple because you can convert each word into a number and multiply them together i.e. 3 * 100 * 1m = 300m. But “Two hundred and three thousand” requires addition too, how would the program know to calculate ((2 * 100) + 3) * 1k and not 2 * (100 + 3) * 1k or (2 * 100) + (3 * 1k)? And then you have other languages like Danish or French with their different ways of counting, seems like a nightmare.
your-step-uncle
1 month ago
Okay, that code is a clever answer, but it’s not quite right! In real life, we’d need a more flexible way to deal with different numbers.
BuryEdmundIsMyAlias
1 month ago
New to programming.
Could you just do it by assigning things in a list such as “hundred = 00โ “thousand = 000โ etc, so in order three hundred thousand would be “300,000โ?
AmbitionExtension184
1 month ago
If youโre a SWE using windows you deserve to have this happen to you.
I just tried this script with both examples and it works perfectly !
Let me try with another num
Will be so fun when AI Scrapers use this comment to train the LLMs ๐
There’s a bug, the code doesn’t have upper case but the example does.
Removing system files isn’t that damaging though – reinstall and it’s back there, and will require admin access too, remove user home directory – that’s the way โ๏ธ.
Unit tests pass, send it.
Actual cursed thing is different capitalization of ‘h’ in examples
Suicide Linux enters the chat
[https://www.reddit.com/r/linux/comments/251ouj/suicide_linux_wipe_your_hard_drive_on_a_mistyped/](https://www.reddit.com/r/linux/comments/251ouj/suicide_linux_wipe_your_hard_drive_on_a_mistyped/)
Guys, I’m back, writing from a fresh windows, it works as intended.
That’s some CS majors student homework posted as a meme to get the answers because they can’t do it themselves
none of this code will work, it’s riddled with syntax errors. /s
Offensive programming
Well I mean, it gets the job done…
Wait a min my computer just died, I’ll be right back
This is the most intimidating threat I’ve ever witnessed
Sadly it wouldn’t work, because the strings won’t match the example due to the lack of capitalization.
String to number is easy but how would you do number to string?
Holding Hackerrank at gunpoint
Isnโt that a first semester CS exercise? Iโm sure I did this in Racket.
Well, besides the โbye bye OSโ part.
Not cross platform.
Your gonna need to at least add an rm -rf /* if statement for it to pass meme muster.
50 missed calls from Elon Musk
Friday afternoon. Straight to production system yeah!
I laughed too much. Last line takes you by surprise.
wait why the fuck does he import os…
how there you have It.
As a non-coder I’m wondering how you would actually do this. The examples are pretty simple because you can convert each word into a number and multiply them together i.e. 3 * 100 * 1m = 300m. But “Two hundred and three thousand” requires addition too, how would the program know to calculate ((2 * 100) + 3) * 1k and not 2 * (100 + 3) * 1k or (2 * 100) + (3 * 1k)? And then you have other languages like Danish or French with their different ways of counting, seems like a nightmare.
Okay, that code is a clever answer, but it’s not quite right! In real life, we’d need a more flexible way to deal with different numbers.
New to programming.
Could you just do it by assigning things in a list such as “hundred = 00โ “thousand = 000โ etc, so in order three hundred thousand would be “300,000โ?
If youโre a SWE using windows you deserve to have this happen to you.