It's obviously wrong, it's not using the modulo function anywhere or any such construct. It'll print text only for '3' and '5', and then numbers from then on.
By the way, GPT 4 when asked to critique this listing immediately found the problem, and produced a corrected version as a bonus.
Bard feels like GPT 2 to me. Even GPT 3.5 can solve COBOL FizzBuzz correctly.
PS: Just to check that GPT 4 is understanding the problem and not just regurgitating something it saw, I asked it to solve the problem in different ways, such as unrolling the loop or avoiding the use of the MOD function. It can do that too.
Yeah, that’s one of my favorite hidden features of GPT-4, if it gives me a function that doesn’t really fit my coding style I’ll tell it how I’d like it and it will adjust.
By the way, GPT 4 when asked to critique this listing immediately found the problem, and produced a corrected version as a bonus.
Bard feels like GPT 2 to me. Even GPT 3.5 can solve COBOL FizzBuzz correctly.
PS: Just to check that GPT 4 is understanding the problem and not just regurgitating something it saw, I asked it to solve the problem in different ways, such as unrolling the loop or avoiding the use of the MOD function. It can do that too.