My groupmate was ranting that chatgpt only started to do programming task after several tries of differently giving him the same text but then worked.

But like, you reap what you sow, chatGPT just works this way on a fundamental level, giving him text as whole in one message, as one paragraph per message, and shuffling senteces without changing actual meaning - everything is a completely different output for him, and that not even mentioning seemingly using RNG (pseudo random number generator) as an additional input and having a character limit