Hacker News new | past | comments | ask | show | jobs | submit login

For printing the first 10 prime numbers, there's a one line solution to this problem:

print("1, 2, 3, 5, 7, 11... and so on!




That code shows me a parse error.


That can't be, because primes are numbers greater than 1.


They said nothing about not printing any non-primes.


This is a good point; English alone is an awful specification language. Everyone knows what you mean by "print the first ten prime numbers" but only by idiom and cultural context. This is why LLM is a good fit here, because -- when it works -- it includes all three aspects.


I suppose it's indeed possible to read the assignment as "print whatever you like as long as it includes 10 or more primes" but I'd fail you for that based on not being able to communicate with humans.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: