That said, I don't know that I would allow AI for learning to code in the class. I do not consider "prompt engineering" to be a substitute for programming, and it's very easy to get AI to write some code and copypaste it, not understand anything it said, and be done.
Last year, when I was administering a test, I said that they were allowed to use any IDE they wanted, but they could not use any AI assistance. I am pretty convinced one student just copypasted my test questions into ChatGPT or BingAI and then copied the answers. I didn't have a way to prove it so I had to give him the benefit of the doubt and grade it assuming he did it honestly.
Before someone says "YOU SHOULD TEACH THEM TO USE THE AI TOOLS LOL THAT'S THE FUTURE!!!", stop. That's not true, not yet at least. Just because I can call an Uber doesn't mean I get to say I know how to drive. Just because I can go to McDonalds doesn't mean I get to say I know how to cook. I was teaching them how to write Java and Python, the goal of the class was for them to learn Java and Python, it wasn't learning how to copypaste into OpenAI.