What the picture shows has nothing to do neither with Mathcad nor with Prime.
Guess the AI confused it with C or C++ programming.
Mathcad and Prime are not text based and so copy and paste can't work anyway.
But you may try to follow the outlined steps and redo them in Mathcad or Prime using the correct syntax, etc.
I am not sure why you think that an AI or AGI would be able to create a ready to use Prime sheet. It would need to create the necessary XML files and data structure an mcdx file consists of of the necessary information to do so is not publicly available.
If you think that your AGI should do better and need help, you definitely should ask in a forum dealing with that AGI.
An AI may be able to deliver a correct algorithm to achieve a certain goal, but at the time being you would need to type it in in Prime yourself. You can't use copy&paste as copying anything from a plain text source only creates a text region in Prime, not a live working math region.
EDIT: As for the exclamation mark (!) which the AGI just uses to preface a comment line - this syntax was already used in Fortran programs. Everything in a line after the exclamation mark is considered text comment and is ignored by the compiler. The very same functionality is the double slash (//) in C and C++ programs. Your AGI also uses this C syntax.
I am not sure where the exclamation mark would be used that way nowadays - maybe Qt, but I am nor sure.
"printf" of course is not a Prime function but is used in C(++) programs for data output.
Actually := as shown on the AGI output is actually used in Prime to assign variables. There are also some programming languages which also use this syntax. But C and C++ use the single equal sign for assignments, no double colon. So the AGI sure is mixing different syntax from various sources.