Use of AI-driven Code Generation Models in Teaching and Learning Programming