niceCodeOhWait

Manik-Zutshi
26 Comments
Subscribe
Notify of
26 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

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.

26
0
Would love your thoughts, please comment.x
()
x