:

## Can ChatGpt really help us with Maple programming?

Maple

Recently, ChatGpt has gained a lot of attention and there are mixed reviews about it. Some people think highly of its capabilities, while others are more critical. Regardless, it has been an interesting  topic on assistant programming.

I'm going to give two examples to illustrate what's interesting and what's lacking.

First, I want ChatGpt to write a Maple code for the enumeration of all prime numbers up to 100. Then it writes:

```primes:= proc(n)
local i, j, primes;
primes:= [2];
for i from 3 to n do
for j from 2 to i-1 do
if i mod j = 0 then break;
end do;
if j = i then primes:= [op(primes), i]; end if;
end do;
return primes;
end proc;

primes(100);
```

I copy and paste this code, maple shows an error: Error, reserved word `do` unexpected

I report the error to it:

this code cannot run since "Error, reserved word `do` unexpected"

Then it gives: I apologize for the error in the previous code. Here is a corrected version of the code that can be run in Maple:

```primes:= proc(n)
local i, j, primesList;
primesList:= [2];
for i from 3 to n do
for j from 2 to i-1 do
if i mod j = 0 then&```