2034_999_DOC_LAB Exploring AI-Powered Coding
2034_999_DOC_LAB Exploring AI-Powered Coding
Student Activity
Student Activity: Exploring AI-Powered Coding
Assistants
Objective:
To help students understand and practice using AI-powered coding assistants through hands-on
examples. This activity will guide students through the basic concepts of AI coding assistants,
focusing on Natural Language Processing (NLP), Machine Learning (ML), and code
suggestions.
Time Required:
Approximately 30-45 minutes
Activity Steps
1. Understanding AI-Powered Coding Assistants
Task: Open a code editor that supports AI coding assistants, such as Visual Studio Code
with GitHub Copilot.
Action: Start typing a simple function in Python, such as def add_numbers(a, b): .
Observation: Notice how the AI suggests completing the function with a return statement
like return a + b .
Task: Intentionally write a piece of code with a syntax error, such as print("Hello
World" .
Action: Observe how the AI suggests the correct syntax by adding the missing
parenthesis.
Observation: Accept the suggestion and see the corrected code.
Task: Write a comment in a different language (if supported), such as Spanish: # Crear
una función para sumar dos números .
Action: Observe how the AI interprets the comment and suggests code.
Observation: Evaluate the AI's ability to understand and generate code from non-English
comments.
Conclusion
Through this activity, students will gain hands-on experience with AI-powered coding assistants,
understanding how they leverage NLP and ML to assist in coding tasks. By practicing with real
examples, students will see the practical benefits of these tools in enhancing coding efficiency
and accuracy.
Discussion Points:
Note: Encourage students to explore different AI coding assistants and experiment with various
programming languages to broaden their understanding.