|
|
|
|
|
by chadgpt3
7 days ago
|
|
For trivial functions they can be. Function: isPrime. Impl: loop to sqrt(n) and check divisibility. Spec: returns true if nothing divides. Impl: return true at the end if we didn't return false. It's not exactly the same because your spec says nothing divides, not just up to sqrt(n). It's definitely not a test if you do it right. |
|