Download as pdf or txt
Download as pdf or txt
You are on page 1of 78

Coding with AI

Introduction to Coding with AI


Resources
Name(s) Period Date

Activity Guide - Pseudocode Practice

Ask your teacher if you should translate the pseudocode to your chosen language by
writing it out on this activity guide, in the space next to the pseudocode, or by typing out
the code in your IDE.

1. Sum of Numbers

Pseudocode

Initialize sum to 0
Initialize N to total of numbers to add
For i from i to N
Add i to sum
End for
Print sum

Code

Coding with AI - Introduction to Coding with AI 1


2. Factorial Calculator

Pseudocode

Initialize factorial to 1
For i from i to N
Multiply factorial by i
End For
Print factorial

Code

Coding with AI - Introduction to Coding with AI 2


3. Odd or Even

Pseudocode

If a number mod 2 is 0
Print “Even”
Else
Pring “Odd”
End If

Code

Coding with AI - Introduction to Coding with AI 3


4. Prime Checker

Pseudocode

Initialize is_prime to true


For i from 2 to square root of number
If the number mod i is 0
Set is_prime to false
Break
End if
End for
If is_prime
Print “Prime”
Else
Print “Not prime”
End if

Code

Coding with AI - Introduction to Coding with AI 4


5. Maximum and Minimum

Pseudocode

Initialize max to first element of array


Initialize min to first element of array
For each element in array
If the element is greater than max
Set max to element
End If
If the element is less than min
Set min to element
End If
End For
Print max, min

Code

Coding with AI - Introduction to Coding with AI 5


6. Array Reversal

Pseudocode

Initialize start to 0
Initialize end to length of array - 1
While start is less than end
Swap array[start] with array[end]
Increment start
Decrement end
End While
Print array

Code

Coding with AI - Introduction to Coding with AI 6


7. Palindrome Checker

Pseudocode

Initialize reversed_string to empty string


For each character in string from end to start
Append character to reversed_string
End For
If reversed_string is equal to string
Print "Palindrome"
Else
Print "Not Palindrome"
End If

Code

Coding with AI - Introduction to Coding with AI 7


8. Temperature Converter

Pseudocode

If conversion is "to Fahrenheit"


Set result to (celsius * 9/5) + 32
Else If conversion is "to Celsius"
Set result to (fahrenheit - 32) * 5/9
End If
Print result

Code

Coding with AI - Introduction to Coding with AI 8


9. Count Occurrences

Pseudocode

Initialize array with given values


Initialize search_value with the value to search for
Initialize count to 0
For each element in array
If element is equal to search_value
Increment count by 1
End If
End For
Print count

Code

Coding with AI - Introduction to Coding with AI 9


10. Basic Calculator

Pseudocode

If the operation is "add"


Set result to number1 + number2
Else If operation is "subtract"
Set result to number1 - number2
Else If operation is "multiply"
Set result to number1 * number2
Else If operation is "divide"
If number2 is not 0
Set result to number1 / number2
Else
Print "Error: Division by zero"
Exit
End If
End If
Print result

Code

Coding with AI - Introduction to Coding with AI 10


Coding with AI
AI as Your Ideation Partner for Programming Prep
Resources
Name(s) Period Date

Activity Guide - AI-Assisted Program Prep

AI Strategies
The strategy below represents a situation you may encounter during the initial stages of program
development, from “I have an idea to create an adventure game, but I don’t know exactly what I want”
to “I know exactly what my idea is and the features I want in my program and would like some
pseudocode to help get me started with one of those features.” Check with your teacher if you and your
partner should try all four strategies (two each) or focus on specific ones.

As you explore the AI strategies, discuss with your partner and compare which strategies each of you
finds supportive to your learning. Don’t forget to document your experiences in your AI Strategies Journal.

󰗧 Example AI System Prompt ¨


You are a Socratic Dialogue Conductor. I am envisioning an app that [creates a city-wide treasure
hunt experience]. I'd like to explore this idea further by having a Socratic discussion with you.

💡 Tips for working with the Socratic Dialogue Conductor 


Tip #1: If the AI starts by asking you what the main idea behind the program is, you can tell the AI,
“I’m not sure yet. Can you help me figure this out?”
● Go through the questions AI gives to you to consider and answer a few of them. Let the AI know
your decisions and continue the dialogue with the suggestions below in order to help you refine
the rest of your idea.

Tip #2: To get more support, ask broad questions that invite exploration and discussion
● Example Open-Ended Questions:
○ What are a few elements that could make the treasure hunt engaging and exciting for
users?
○ What are a few considerations that should be made to ensure the app is accessible
and enjoyable for a wide demographic?

Tip #3: As the AI responds, keep the dialogue going by asking follow-up questions, seeking
clarifications, and exploring the responses further.
● Example Follow Up Question:
○ How could technology, such as Augmented Reality (AR) or GPS, enhance the treasure
hunting experience?

Tip #4: Pose new questions based on your refined idea to delve deeper into specific aspects.
● Example Refined Idea Description:
○ My refined idea is a Treasure Hunt app utilizing AR and GPS technology to create
engaging, safe, and accessible treasure hunting experiences in a city setting. How could
the app foster a sense of community among users, and encourage positive interactions
both online and offline?

Coding with AI - AI as Your Ideation Partner for Programming Prep 1


💻 Socratic Dialogue Conductor Behavior Expectations ©
It is expected that the AI response is similar to the image below. However, there are occasions when the
AI might decide to provide an example of a Socratic Dialogue, providing you with both sides of the
discussion. If this happens, make sure to use the exact wording of the Example AI System Prompt,
replacing the idea in brackets with your idea.

When asking the AI for suggestions, it often gets carried away and gives you too many suggestions
which are overwhelming. If this happens, reword your question and ask the AI for a specific number of
suggestions, like 2 or 3.

Coding with AI - AI as Your Ideation Partner for Programming Prep 2


AI Strategies
The strategy below represents a situation you may encounter during the initial stages of program
development, from “I have an idea to create an adventure game, but I don’t know exactly what I want”
to “I know exactly what my idea is and the features I want in my program and would like some
pseudocode to help get me started with one of those features.” Check with your teacher if you should try
all four strategies or focus on specific ones.

As you explore the AI strategies, discuss with your partner and compare which strategies each of you
finds supportive to your learning. Don’t forget to document your experiences in your AI Strategies Journal.

💬 Brainstorming Assistant and Creative Consultant š


Sometimes we have ideas for a program but are unsure about all the details,
such as the target audience or features needed. In these cases, we would
benefit from having someone to brainstorm with.
Let’s see if AI can support us with this step.

✅ Instructions 
Goal: Describe the idea to the AI model and receive suggestions and insights about the goal, target
audience, and any features to enhance the program idea.

1. Choose at least one idea listed below or use a general idea you already have.
○ Virtual Pet Care App - users can adopt, nurture, and play with virtual pets
○ Music Mood Matcher - a program that can create playlists based on the user’s mood
○ Eco-Friendly Challenge Game - a game that challenges players to live an eco-friendly
life
○ Fitness Friend - app that creates personalized workouts and meal plans
○ Refined idea from Socratic Dialogue strategy

󰗧 Example AI System Prompt ¨


You are a creative brainstorming assistant and creative consultant. I have an idea for an app [that
forecasts weather] and would like your assistance with various aspects of this idea.

Coding with AI - AI as Your Ideation Partner for Programming Prep 3


💡 Tips for working with the Brainstorming Assistant and Creative Consultant 
Tip: Ask questions about the aspect of the program you want to brainstorm ideas about.
● Goal Identification Examples:
○ What could be the primary and secondary objectives of this app?
○ How might this app benefit the users or community?
● Target Audience Determination Examples:
○ Who might be the 3 most interested users for this app?
○ What age group and demographics should this app cater to?
● Feature Suggestions Examples:
○ What are a few features that could make the experience enjoyable and meaningful?
○ Are there a few educational or social engagement features that could be integrated?
● Enhancement Idea Examples:
○ What are a few ideas of how this app can stand out from other weather forecasting
apps?
○ Are there any technologies or design approaches that could enhance the user
experience?

💻 Brainstorming Assistant Behavior Expectations ©


It is expected that the AI response is similar to
the image to the right.

However, there are occasions when the AI might


decide to give you a lengthy list of aspects to
explore and brainstorm together like the image
below, which can feel overwhelming.

If this happens, edit your original prompt to be more specific. For


example, instead of saying that you would like assistance with
“various aspects”, identify a specific aspect, such as help with
identifying the purpose or help with identifying the target audience.

The AI will often get carried away and give you too many
suggestions which are overwhelming. If this happens, reword your
question and ask the AI for a specific number of suggestions, like 2
or 3.

Coding with AI - AI as Your Ideation Partner for Programming Prep 4


AI Strategies
The strategy below represents a situation you may encounter during the initial stages of program
development, from “I have an idea to create an adventure game, but I don’t know exactly what I want”
to “I know exactly what my idea is and the features I want in my program and would like some
pseudocode to help get me started with one of those features.” Check with your teacher if you should try
all four strategies or focus on specific ones.

As you explore the AI strategies, discuss with your partner and compare which strategies each of you
finds supportive to your learning. Don’t forget to document your experiences in your AI Strategies Journal.

💬 Library Recommendation Specialist š


Sometimes we have an awesome idea for a program that might have some
common features and requirements that already exist in libraries for our
programming language. While there are many libraries out there that provide
functions to perform many common tasks that we might need to use in our
programs, we may not be aware of them all.
Let’s see if AI can support us with this step.

✅ Instructions 
Goal: Discuss the project and the feature(s) you identified with the AI to get recommendations on
which libraries are best suited for that part of the project.

1. Choose one of the programming project ideas listed below or use a project idea you already
have.
○ Beat Match Music App - A music app that allows users to discover new songs and artists
based on their current music preferences and listening habits.
■ Features: Signing up and logging in, discovering new songs and artists based on
listening history, creating, editing, and sharing playlists, following friends and
exploring their music, liking and commenting on shared music and playlists.
○ EcoTracker - An app that helps users track and reduce their carbon footprint by logging
daily activities and suggesting eco-friendly alternatives
■ Features: Creating an account and setting eco-goals, logging daily activities like
transportation and waste generation, viewing carbon footprint calculations and
history, receiving suggestions for eco-friendly alternatives, tracking progress
towards eco-goals over time.
○ Sketch-N-Share - A social drawing app where users can create, share, and collaborate
on digital sketches and artwork
■ Features: Signing up and setting up a profile, creating and editing digital
sketches, sharing sketches with the community, receiving likes and comments on
sketches, collaborating on sketches with others in real-time.
○ Detailed project idea from Brainstorming Assistant strategy
2. Look at the list of program features for your chosen idea, and based on the project description,
decide which of those features you might want to see if there are libraries available that could
aid in the development of that part of the program. Note: Make sure you double-check that the
suggested libraries actually exist for your programming language

Coding with AI - AI as Your Ideation Partner for Programming Prep 5


󰗧 Example AI System Prompt ¨
You are a Program Library Recommendation Specialist. I am envisioning a platform where [local
farmers can list their fresh produce, and customers can browse, purchase, and arrange for delivery or
pick-up]. What libraries would be suitable for [implementing user authentication] in [your
programming language]?

💡 Tips for working with the Library Recommendation Specialist 


Tip: The phrasing of your question may lead to different recommendations. Try some out and see
what you get
● Examples:
○ Are there any libraries that can assist in creating a seamless product listing and
browsing experience?
○ What libraries or APIs would you recommend for handling shopping cart functionalities?
○ Which libraries can help in implementing a scheduling system for delivery and pick-up?
○ What libraries can be used to implement a rating and review system?

💻 Library Recommendation Specialist Behavior Expectations ©


It is expected that the AI response will be similar to the images below. As you can see, AI might decide
to provide you with useful links. However, it is always important to check whether the suggested
libraries exist and, if they do exist, that they do what AI is telling you they do.

AI often gets carried away and gives you too many overwhelming suggestions. If this happens, reword
your question and ask the AI for several suggestions, like 2 or 3.

Coding with AI - AI as Your Ideation Partner for Programming Prep 6


AI Strategies
The strategy below represents a situation you may encounter during the initial stages of program
development, from “I have an idea to create an adventure game, but I don’t know exactly what I want”
to “I know exactly what my idea is and the features I want in my program and would like some
pseudocode to help get me started with one of those features.” Check with your teacher if you should try
all four strategies or focus on specific ones.

As you explore the AI strategies, discuss with your partner and compare which strategies each of you
finds supportive to your learning. Don’t forget to document your experiences in your AI Strategies Journal.

💬 Pseudocode Generation Assistant š


When we are in the early stages of program development, it is common to
have a fully formed idea for a program, complete with features we’d like to
have. However, looking at a blank IDE screen can be intimidating, and we might
not know where to start, especially if our program has multiple features. Often
all we need is a little support with some beginning pseudocode to get us
started, and then we are off and running!
Let’s see if AI can support us with this step.

✅ Instructions 
Goal: Work with the AI to generate pseudocode for one aspect or feature of the project, which you can
then translate to your chosen programming language.

1. Choose one of the programming project ideas listed below or use a project idea you already
have.
○ Memory Lane - A digital journal app where users can record, organize, and reflect on
their daily experiences, photos, and moods.
■ Features: Signing up and logging in, creating and editing journal entries with text
and photos, tracking moods daily, viewing past entries on a timeline, and
searching entries by keywords or dates.
○ Code Quest - A gamified platform where users can learn programming by embarking on
coding quests and challenges.
■ Features: Creating a profile and tracking progress, embarking on coding quests
and challenges, getting real-time feedback on code, discussing and asking
questions in community forums, earning badges, and climbing the leaderboard.
○ Skill Swap - A platform that connects individuals looking to exchange skills – for
example, a user can offer guitar lessons in exchange for Spanish tutoring.
■ Features: Signing up and listing skills, browsing and matching with other skill
swappers, messaging to arrange skill swap sessions, rating and reviewing swap
experiences, and finding local skill swappers based on location.
○ Mind Maze - An app offering a variety of brain-training games and puzzles to help
improve memory, focus, and problem-solving skills
■ Features: Creating a profile and tracking brain-training progress, playing
brain-training games and puzzles, taking on daily mental challenges, challenging
friends to brain games, learning about brain health through fun facts.

Coding with AI - AI as Your Ideation Partner for Programming Prep 7


○ Detailed project idea from Brainstorming Assistant or Library Recommendation
strategy
2. Look at the list of program features for your chosen idea and based on the project description
decide which of those features you might want to start with.
○ If you are unsure, use one of the previous strategies to discuss the idea with AI to see
which feature you should start coding first.

󰗧 Example AI System Prompt ¨


You are a Pseudocode Generation Assistant. I am envisioning an app where users can [adopt and take
care of virtual pets. They can feed, train, play with their pets, and even participate in virtual pet shows
or competitions]. What would be pseudocode for the main feature of [pet adoption]?

💡 Tips for working with the Pseudocode Generation Assistant 


Tip:the pPhrasing of your question may lead to different recommendations. Try some out and see
what you get
● Examples:
○ What would be pseudocode for the user signup and login process?
○ Can you help generate pseudocode for the pet care features like feeding, bathing, and
training?
○ What would be the outline for implementing gameplay and competitions in
pseudocode?
○ How can pseudocode be structured for social interaction features like adding friends?

Coding with AI - AI as Your Ideation Partner for Programming Prep 8


💻 Pseudocode Generation Behavior Expectations ©
It is expected that the AI response will be similar to the images below. While both responses deliver
pseudocode, they are formatted differently.

Regardless of the way


AI provides the
pseudocode, you will
be the one to translate
it and check whether
the suggested
algorithm is actually
correct and does what
you expect.

Coding with AI - AI as Your Ideation Partner for Programming Prep 9


Name(s) Period Date

AI Chatbot Prompting Guide

Basic Structure of a Prompt


The chatbots we will use are large language models (LLMs). LLMs say things based on what words
and sentences probably come next. As a result, it helps to have some guidance on interacting
with the chatbot to get a satisfactory result.

Note: Regardless of your prompt, the chatbot can still have “hallucinations” and state things as
facts that sound correct but are not true. It is always important to double-check all information
you find online - whether from an AI or a traditional search engine!

Basic Structure of a Prompt:


Acting as a [ROLE] perform [TASK] in [FORMAT]

Act as a [ROLE] Create a [TASK] Show as [FORMAT]


Researcher Detailed Answer List
Journalist Summary Summary
Analyst Analysis Table
Historian Product Description Simple Terms
Thought Partner Outline 2-3 Examples/Answers
Teacher Instructions Code

Examples:
Acting as a thought partner, discuss new fundraising ideas with me by providing a list of ideas
with reasons behind each list item.

Acting as a critic, analyze these fundraising ideas I created. Are there any I missed? Which ones
seem particularly good or bad? Provide the analysis in simple terms.
Tips and Tricks
1. Write clear and specific instructions. Since the LLMs try to follow instructions, make the
instructions as detailed as possible. Longer prompts usually are better and provide more
information than shorter prompts. This also includes giving the model an example of the output
you expect before it completes the task.

2. Limit the LLM response. If the output is too long, tell the model to be specific on length. For
example: Use 2-3 sentences, provide 3-4 list items, or use 50 words at most.

3. Reduce hallucinations by splitting up the task. When the task involves finding factual
information, ask the LLM to find relevant information FIRST, then ask it to answer the question
based on the pertinent information that it found. You can also ask the LLM to cite its sources!

4. Be specific about the audience. Tell the model who the audience is (5th graders, teenagers,
college graduates, etc) and how much or what the audience knows (limited knowledge,
beginners, expert in the field ).

5. Simplify the response to gain clarity or a deeper understanding. When you need to
understand the model’s complicated response, tell the model to simplify its response using one of
the example prompts:

● Explain [insert specific topic] in simple terms.


● Explain to me like I’m 11 years old.
● Explain to me as if I’m a beginner in [field].

Key Terms Tones


Act as: The role/character: e.g., professional Defining the tone that the model
Tones: How to speak: friendly, professional, funny, etc should give its responses can be
Clarity: Be clear about what you want helpful. Examples: friendly,
Specify: Specify your needs without unnecessary professional, funny, sad, thrilling,
additions exciting, adventurous, informative,
Details: Give organized details to cover all the prospects progressive, stable, consistent,
Format: Try to show the format of the result you wish trendsetting, innovative, etc.
Avoid: Always set which things it should avoid
Summary of Things to Do in Your Prompt
1. Set the context: Start by specifying the role you want the model to play. This helps set the
expectations and provides a frame of reference for the generated responses.

2. Define the task: Describe the specific task or action the model should perform. This will clarify
the desired outcome.

3. State the requirements: Clearly state what you need from the model, such as a
recommendation, solution, or answer. This helps narrow down the focus of the conversation.

4. Specify the desired format: Indicate the format or structure in which you would like the final
result to be presented. This ensures the generated output aligns with your expectations.

5. Provide details: Specify any additional details or considerations that should be considered
during the task.

6. Mention restrictions: Clearly state any limitations or restrictions that should be followed. This
helps avoid generating responses that are not suitable or desired.

7. Provide examples: Include examples to give the model a reference point and help it
understand the type of response you are looking for. This can improve the quality and relevance
of the generated answers.

Remember, assigning the model a specific role and providing a straightforward task with clear
format instructions through a well-constructed prompt increases the likelihood of obtaining
accurate and helpful responses.
Name(s) Period Date

Activity Guide - My Initial Steps Value Statements

What is my Coding with AI Value Statement?


Figuring out your Coding with AI Value Statement means determining whether you would use AI
when you are programming and, in particular, how and when. Answer the questions in the steps
below to help you establish your Coding with AI Values.

Step 1: AI Decisions

Instructions: Decide whether you would use AI to support the initial steps of the programming process.

● Would you use AI during the initial stages of program development?

*If your answer is no, skip to Step 3

Step 2: Strategy Decisions

Instructions: If you would use AI, identify which strategies are most supportive to your learning and
explain why.

● If you stated in Step 1 that you would use AI, identify which of the four strategies you would use.

● Why you would use those strategies and how they would be supportive to your learning.
○ Consider how the strategy assisted you in this stage of the programming process or how
interacting with the AI influenced your thought process or approach?

● When during the initial programming stages would you find this strategy most beneficial? (e.g.,
before you even start, when you are stuck, once you have ideas that need to be refined or
developed)
○ Think about when you might feel the need to turn to the AI strategy (or strategies), and
what might trigger this need in the future.

Coding with AI - AI as Your Ideation Partner for Programming Prep 1


Step 3: Value Statement

Instructions: Develop a value statement for each strategy you would use, integrating your insights from
your exploration.

Note: If you answered “no” to the question in Step 1, your value statement will be about why you
would not use each strategy.

● Your value statement should include the following aspects:


○ What - What AI strategies you would use
○ Who - identify your level of CS knowledge
○ When - when you would use the strategies
○ How - how you would use the strategies to support learning

● Example Value statement: When a beginner programmer is stuck getting started with the actual
coding, AI can assist by providing pseudocode for a feature or two to help get started, but it is up
to the student to take the pseudocode and create actual code from it to ensure ownership of the
code and coding practice to continue learning.

Value Statement:

Value Statement:

Value Statement:

Value Statement:

Coding with AI - AI as Your Ideation Partner for Programming Prep 2


Reflection Stations

Setup
Print the Materials (Single-Sided)
● Instructions (pages 3-5): Students will be working in pairs. There are three different
stations, so you will need to have enough sets of instructions at each station to cover your
class that will be divided amongst the stations.

For example, if you have 20 students, you would have 10 pairs. Three pairs could be at
Station A, three pairs at Station B, and four pairs at Station C. You would print out four copies
of the instructions to cover all of the students.

● Post-it Sticky Notes: Each student will use 2 sticky notes at each station. Ensure there are
enough sticky notes at each station for all students. It will be helpful to have two different
color sticky notes at each station for the two questions.

Note: If you have access to multicolored paper, you may want to print each part on a different
color to be posted around the room. This will help students move from one problem to another
because they will be able to look for unique paper colors rather than walking up to the problem to
determine whether they have already completed it.

Place Students in Pairs


Place your students in pairs so they always have someone with whom to discuss their thoughts.
The pairs should differ from those they worked on the AI strategies with during the main activity.

Distribute post-its to each pair, or have post-its available at each station. Remind students that
they do not need to complete the stations in order.

Coding with AI - AI as Your Ideation Partner for Programming Prep 1


Post the Instructions
Post the instructions around the classroom,
making sure to space them far enough apart
so that students have space to write their
responses on post-its. Based on your room
configuration, you may want to try one of the
following options:

● Place the parts around the room,


taping questions to walls, doors,
cabinets, whiteboards, or shelves.
● Create pods of desks/tables in your classroom, and post one part at each pod.
● Spread out by posting parts in the hallway outside of your classroom.

Post the Station Posters


Post the station posters in a part of the wall that is "central" to each station. Students should be
able to read the instructions, write their responses on a post-it, and then attach their post-its to
the station poster.

Station A Poster Setup

Coding with AI - AI as Your Ideation Partner for Programming Prep


2
Station B Poster Setup

Station C Poster Setup

Coding with AI - AI as Your Ideation Partner for Programming Prep


3
STATION A
Think about the following question:

Did you find that AI assistance stifled or enhanced your personal creativity during the activity?

Where on the scale below do you fall?

Do This:

1. Determine where you fall on the scale above.

2. Write your reasons on a sticky note.

3. Place your sticky note along the scale on the Station A Poster in the area you determined in step 1.

4. Add your thoughts to the following question on a second sticky: In what ways can AI assistance in coding

projects be balanced with personal creativity to ensure originality?

5. Place your second sticky on the Station A Poster.

If time allows, discuss your scale placement and 2nd sticky response with those at your station.

Coding with AI - AI as Your Ideation Partner for Programming Prep 4


STATION B
Reflecting on today’s activities . . .

When would you choose to use AI for brainstorming or refining problem descriptions in future projects?

Do This:

1. Determine where you fall on the chart above.


2. Write your reasons on a sticky note.
3. Place your sticky note in your chosen area on the Station B Poster in the area you determined in step 1.
4. Add your thoughts to the following question on a second sticky: Are there situations where you would
avoid using AI in the creative process? Explain.
5. Place your second sticky on the Station B Poster.

If time allows, discuss your chart placement and 2nd sticky response with those at your station.

Coding with AI - AI as Your Ideation Partner for Programming Prep 5


STATION C
Think about the following question:

Do you think it’s ethical to use AI-generated code in your projects without disclosure?

Do This:

1. Determine where you fall on the chart above.


2. Write your reasons on a sticky note.
3. Place your sticky note along the scale on the Station C Poster in the area you determined in step 1.
4. Add your thoughts to the following question on a second sticky: Are there any other ethical
considerations when using AI to generate or refine ideas for coding projects?
5. Place your second sticky on the Station C Poster.

If time allows, discuss your scale placement and 2nd sticky response with those at your station.

Coding with AI - AI as Your Ideation Partner for Programming Prep 6


Name(s) Diego Rodriguez Period 7th Date 2/21/24

Activity Guide - Reflection Stations

] Station Instructions
1. Note in the spaces below where you placed your sticky at each station with an "X".
2. Share your thoughts on your placement and the follow-up question at each station and get
signatures after discussing.
3. Make yourself any notes you want to remember about each station, such as an idea you or
someone else had that you liked and want to remember as you get ready to make your
Values Statement.

STATION A

Did you find that AI assistance stifled or enhanced your personal creativity during the activity?

In what ways can AI assistance in coding projects be balanced


with personal creativity to ensure originality?

Notes:
________________

Station A – Peer Signature

Coding with AI - AI as Your Ideation Partner for Programming Prep 1


STATION B

When would you choose to use AI for brainstorming or refining


problem descriptions in future projects?

Are there situations where you would avoid using AI in the creative process? Explain.

Notes:

________________

Station B – Peer Signature

STATION C

Do you think it’s ethical to use AI-generated code in your projects without disclosure?

Are there any other ethical considerations when using AI


to generate or refine ideas for coding projects?

Notes:

________________

Station C – Peer Signature

Coding with AI - AI as Your Ideation Partner for Programming Prep 2


Final Thoughts
Use the space below to add any final thoughts about using AI strategies during the initial planning
phase of the programming process.

Coding with AI - AI as Your Ideation Partner for Programming Prep 3


Coding with AI
Navigating Algorithms with the Help of AI
Resources
Name(s) Period Date

AI Chatbot Prompting Guide

Basic Structure of a Prompt


The chatbots we will use are large language models (LLMs). LLMs say things based on what words
and sentences probably come next. As a result, it helps to have some guidance on interacting
with the chatbot to get a satisfactory result.

Note: Regardless of your prompt, the chatbot can still have “hallucinations” and state things as
facts that sound correct but are not true. It is always important to double-check all information
you find online - whether from an AI or a traditional search engine!

Basic Structure of a Prompt:


Acting as a [ROLE] perform [TASK] in [FORMAT]

Act as a [ROLE] Create a [TASK] Show as [FORMAT]


Researcher Detailed Answer List
Journalist Summary Summary
Analyst Analysis Table
Historian Product Description Simple Terms
Thought Partner Outline 2-3 Examples/Answers
Teacher Instructions Code

Examples:
Acting as a thought partner, discuss new fundraising ideas with me by providing a list of ideas
with reasons behind each list item.

Acting as a critic, analyze these fundraising ideas I created. Are there any I missed? Which ones
seem particularly good or bad? Provide the analysis in simple terms.
Tips and Tricks
1. Write clear and specific instructions. Since the LLMs try to follow instructions, make the
instructions as detailed as possible. Longer prompts usually are better and provide more
information than shorter prompts. This also includes giving the model an example of the output
you expect before it completes the task.

2. Limit the LLM response. If the output is too long, tell the model to be specific on length. For
example: Use 2-3 sentences, provide 3-4 list items, or use 50 words at most.

3. Reduce hallucinations by splitting up the task. When the task involves finding factual
information, ask the LLM to find relevant information FIRST, then ask it to answer the question
based on the pertinent information that it found. You can also ask the LLM to cite its sources!

4. Be specific about the audience. Tell the model who the audience is (5th graders, teenagers,
college graduates, etc) and how much or what the audience knows (limited knowledge,
beginners, expert in the field ).

5. Simplify the response to gain clarity or a deeper understanding. When you need to
understand the model’s complicated response, tell the model to simplify its response using one of
the example prompts:

● Explain [insert specific topic] in simple terms.


● Explain to me like I’m 11 years old.
● Explain to me as if I’m a beginner in [field].

Key Terms Tones


Act as: The role/character: e.g., professional Defining the tone that the model
Tones: How to speak: friendly, professional, funny, etc should give its responses can be
Clarity: Be clear about what you want helpful. Examples: friendly,
Specify: Specify your needs without unnecessary professional, funny, sad, thrilling,
additions exciting, adventurous, informative,
Details: Give organized details to cover all the prospects progressive, stable, consistent,
Format: Try to show the format of the result you wish trendsetting, innovative, etc.
Avoid: Always set which things it should avoid
Summary of Things to Do in Your Prompt
1. Set the context: Start by specifying the role you want the model to play. This helps set the
expectations and provides a frame of reference for the generated responses.

2. Define the task: Describe the specific task or action the model should perform. This will clarify
the desired outcome.

3. State the requirements: Clearly state what you need from the model, such as a
recommendation, solution, or answer. This helps narrow down the focus of the conversation.

4. Specify the desired format: Indicate the format or structure in which you would like the final
result to be presented. This ensures the generated output aligns with your expectations.

5. Provide details: Specify any additional details or considerations that should be considered
during the task.

6. Mention restrictions: Clearly state any limitations or restrictions that should be followed. This
helps avoid generating responses that are not suitable or desired.

7. Provide examples: Include examples to give the model a reference point and help it
understand the type of response you are looking for. This can improve the quality and relevance
of the generated answers.

Remember, assigning the model a specific role and providing a straightforward task with clear
format instructions through a well-constructed prompt increases the likelihood of obtaining
accurate and helpful responses.
Name(s) Period Date

Four Corners Reflection - Activity Guide

Overview
Use this handout to remind yourself which corner you chose for each of the reflection questions.
You can also use this handout to jot down your thoughts or your classmate’s thoughts that you
would like to remember when it comes time to create your Algorithms and AI Value Statements.

Reflection #1
❓ How did using AI influence your approach to algorithm planning compared to doing it without
AI support?

Corner 1
Significantly improved my approach
Corner 2
Made some positive changes,
💭 My choice & thoughts:
but not major

Corner 3 Corner 4
Had no significant impact Made the process more
confusing or difficult

💬 Someone said:
Reflection #2
£ Do you think reliance on AI for algorithm planning might impact the skills of a programmer in
the long run?

Corner 1
Yes, it will greatly improve skills
Corner 2
It might improve some skills
› My choice & thoughts:
but not all

Corner 3 Corner 4
No significant impact on skills It could negatively impact
programming skills

💬 Someone said:

Coding with AI - Navigating Algorithms with the Help of AI 1


Reflection #3
❓ Did you encounter any ethical dilemmas while using AI for algorithm development?
Corner 1
Encountered many ethical dilemmas
Corner 2 💭 My choice & thoughts:
Faced a few ethical considerations

Corner 3 Corner 4
Not sure if there were Did not encounter any
ethical dilemmas ethical dilemmas

💬 Someone said:
Reflection #4
£ How might the use of AI in algorithm planning affect issues of intellectual property and
originality in coding?

Corner 1
Poses a significant risk to originality
Corner 2
May have some impact,
› My choice & thoughts:
but manageable

Corner 3 Corner 4
Little to no impact on originality Can actually enhanc
originality and IP

💬 Someone said:

Reflection #5
£ In what situations would you prefer using AI for algorithm planning, and when would you
choose not to use it?

Corner 1
Prefer using AI in most situations
Corner 2
Use AI for complex tasks only
› My choice & thoughts:
Corner 3 Corner 4
Rarely use AI, mostly rely on Avoid using AI altogether
traditional methods

💬 Someone said:

Coding with AI - Navigating Algorithms with the Help of AI 2


Name(s) Period Date

Activity Guide - My Algorithm & AI Value Statement

What is my Coding with AI Value Statement?


Figuring out your Coding with AI Value Statement means determining whether you would use AI
when you are programming and, in particular, how and when. Answer the questions in the steps
below to help you establish your Coding with AI Values.

Step 1: AI Decisions

Instructions: Decide whether you would use AI to support algorithm planning in the programming
process.

● Would you use AI during algorithm planning?

*If your answer is no, skip to Step 3

Step 2: Strategy Decisions

Instructions: If you would use AI, identify which strategies are most supportive to your learning and
explain why.

● If you stated in Step 1 that you would use AI, identify which of the four strategies you would use.

● Why you would use those strategies and how they would be supportive to your learning.
○ Consider how the strategy assisted you in this stage of the programming process or how
interacting with the AI influenced your thought process or approach?

Coding with AI - Navigating Algorithms with the Help of AI 1


● When during the programming stages would you find this strategy most beneficial? (e.g., before
you even start, when you are stuck, once you have ideas that need to be refined or developed)
○ Think about when you might feel the need to turn to the AI strategy (or strategies), and
what might trigger this need in the future.

Step 3: Value Statement

Instructions: Develop a value statement for each strategy you would use, integrating your insights from
your exploration.
Note: If you answered “no” to the question in Step 1, your value statement will be about why you
would not use each strategy.

● Your value statement should include the following aspects:


○ What - What AI strategies you would use
○ Who - identify your level of CS knowledge
○ When - when you would use the strategies
○ How - how you would use the strategies to support learning

● Example Value statement: When a beginner programmer is stuck getting started with the actual
coding, AI can assist by providing pseudocode for a feature or two to help get started, but it is up
to the student to take the pseudocode and create actual code from it to ensure ownership of the
code and coding practice to continue learning.

Value Statement:

Value Statement:

Value Statement:

Value Statement:

Coding with AI - Navigating Algorithms with the Help of AI 2


Name(s) Period Date

Activity Guide - Mystery Algorithms

Instructions
Welcome, young code detectives, to the Mystery Algorithms challenge! Your mission is to unravel
the secrets behind each enigmatic description, deciphering which algorithm is hidden within. Use
your coding knowledge and intuition to crack these puzzles and reveal the true identities of these
mysterious algorithms. Good luck!

Algorithm #1
Mystery Description: "I'm a treasure hunter that divides and conquers, swiftly narrowing down
where the treasure lies in a sorted world. What am I?"

Answer:

Algorithm #2
Mystery Description: "In a kingdom of numbers, I reign supreme by making sure everyone is in
their rightful order, from the smallest peasant to the greatest king."

Answer:

Algorithm #3
Mystery Description: "I'm the wise sage that takes a long journey, visiting every town exactly once
before returning home, seeking the shortest path all along."

Answer:

Algorithm #4
Mystery Description: "In a maze of choices, I'm the guide who finds the path of least resistance,
illuminating the way from start to finish."

Answer:

Coding with AI - Navigating Algorithms with the Help of AI 1


Algorithm #5
Mystery Description: "Imagine a librarian who knows exactly where every book should go, swiftly
organizing them by following a divide and rule principle."

Answer:

Algorithm #6
Mystery Description: "I'm the crafty detective who asks 'hotter or colder' to zero in on the hidden
number, guessing smarter, not harder."

Answer:

Algorithm #7
Mystery Description: "Like a master chef blending ingredients, I mix and combine arrays until
they're all sorted out, creating a perfect recipe."

Answer:

Algorithm #8
Mystery Description: "In a land of pixels and colors, I'm the artist who compresses images,
capturing essence without the bulk."

Answer:

Algorithm #9
Mystery Description: "I am the guardian of secrets, transforming messages into indecipherable
codes, shielding them from prying eyes."

Answer:

Algorithm #10
Mystery Description: "In the bustling city of social media, I'm the one who decides what news or
stories appear on your feed, based on your interests."

Answer:

Coding with AI - Navigating Algorithms with the Help of AI 2


Coding with AI
AI as Your Debugging Partner
Resources
Name(s) Period Date

AI Chatbot Prompting Guide

Basic Structure of a Prompt


The chatbots we will use are large language models (LLMs). LLMs say things based on what words
and sentences probably come next. As a result, it helps to have some guidance on interacting
with the chatbot to get a satisfactory result.

Note: Regardless of your prompt, the chatbot can still have “hallucinations” and state things as
facts that sound correct but are not true. It is always important to double-check all information
you find online - whether from an AI or a traditional search engine!

Basic Structure of a Prompt:


Acting as a [ROLE] perform [TASK] in [FORMAT]

Act as a [ROLE] Create a [TASK] Show as [FORMAT]


Researcher Detailed Answer List
Journalist Summary Summary
Analyst Analysis Table
Historian Product Description Simple Terms
Thought Partner Outline 2-3 Examples/Answers
Teacher Instructions Code

Examples:
Acting as a thought partner, discuss new fundraising ideas with me by providing a list of ideas
with reasons behind each list item.

Acting as a critic, analyze these fundraising ideas I created. Are there any I missed? Which ones
seem particularly good or bad? Provide the analysis in simple terms.
Tips and Tricks
1. Write clear and specific instructions. Since the LLMs try to follow instructions, make the
instructions as detailed as possible. Longer prompts usually are better and provide more
information than shorter prompts. This also includes giving the model an example of the output
you expect before it completes the task.

2. Limit the LLM response. If the output is too long, tell the model to be specific on length. For
example: Use 2-3 sentences, provide 3-4 list items, or use 50 words at most.

3. Reduce hallucinations by splitting up the task. When the task involves finding factual
information, ask the LLM to find relevant information FIRST, then ask it to answer the question
based on the pertinent information that it found. You can also ask the LLM to cite its sources!

4. Be specific about the audience. Tell the model who the audience is (5th graders, teenagers,
college graduates, etc) and how much or what the audience knows (limited knowledge,
beginners, expert in the field ).

5. Simplify the response to gain clarity or a deeper understanding. When you need to
understand the model’s complicated response, tell the model to simplify its response using one of
the example prompts:

● Explain [insert specific topic] in simple terms.


● Explain to me like I’m 11 years old.
● Explain to me as if I’m a beginner in [field].

Key Terms Tones


Act as: The role/character: e.g., professional Defining the tone that the model
Tones: How to speak: friendly, professional, funny, etc should give its responses can be
Clarity: Be clear about what you want helpful. Examples: friendly,
Specify: Specify your needs without unnecessary professional, funny, sad, thrilling,
additions exciting, adventurous, informative,
Details: Give organized details to cover all the prospects progressive, stable, consistent,
Format: Try to show the format of the result you wish trendsetting, innovative, etc.
Avoid: Always set which things it should avoid
Summary of Things to Do in Your Prompt
1. Set the context: Start by specifying the role you want the model to play. This helps set the
expectations and provides a frame of reference for the generated responses.

2. Define the task: Describe the specific task or action the model should perform. This will clarify
the desired outcome.

3. State the requirements: Clearly state what you need from the model, such as a
recommendation, solution, or answer. This helps narrow down the focus of the conversation.

4. Specify the desired format: Indicate the format or structure in which you would like the final
result to be presented. This ensures the generated output aligns with your expectations.

5. Provide details: Specify any additional details or considerations that should be considered
during the task.

6. Mention restrictions: Clearly state any limitations or restrictions that should be followed. This
helps avoid generating responses that are not suitable or desired.

7. Provide examples: Include examples to give the model a reference point and help it
understand the type of response you are looking for. This can improve the quality and relevance
of the generated answers.

Remember, assigning the model a specific role and providing a straightforward task with clear
format instructions through a well-constructed prompt increases the likelihood of obtaining
accurate and helpful responses.
Name(s) Period Date

Activity Guide - Debugging with AI: Error Diagnosis

AI Strategies
The strategy below is a way to use AI to support your code debugging.

As you explore the strategy, discuss with your partner and compare which strategies support your
learning. Don’t forget to document your experiences in your AI Strategies Journal.

💬 Error Diagnosis Guide š


More often than not, we have bugs in our code. Everyone gets bugs … even
those who write code for a living! Often, all it takes is discussing the code
segment with someone and POOF! We identify and fix the error!
Let’s see if AI can support us with this step.

✅ Instructions 
Goal: Interact with the AI to analyze the code, discuss error possibilities, and propose solutions.

1. Translate the buggy pseudocode segments below into your chosen programming language.
○ Choose one segment to translate and use with the AI at a time.

2. Use the example AI System Prompt to begin interacting with the AI to discuss error possibilities.

3. Based on your interaction with the AI, debug the code and run the segment to see if it works.

Coding with AI - AI as Your Debugging Partner 1


⚠ Buggy Pseudocode p
Intended function: finds and prints the minimum value Intended function: counts and prints the number of
in an array even numbers in an array
SET values TO [8, 5, 7, 2, 4] SET numbers TO [2, 3, 4, 5, 6]
SET minValue TO 0 SET evenCount TO 0
FOR EACH value IN values FOR EACH number IN numbers
IF value LESS THAN minValue IF number MODULO 2 EQUALS 1
SET minValue TO value INCREMENT evenCount
END IF END IF
END FOR END FOR
PRINT minValue PRINT evenCount

Intended function: prints the first few numbers of the Intended function: checks if a given string is a
Fibonacci sequence palindrome and prints true or false
SET firstNumber TO 0 SET inputString TO "madam"
SET secondNumber TO 1 SET isPalindrome TO TRUE
FOR i FROM 1 TO 5 FOR i FROM 0 TO LENGTH OF inputString / 2
PRINT firstNumber IF inputString[i] NOT EQUAL TO
SET temp TO firstNumber inputString[LENGTH OF inputString - i]
SET firstNumber TO secondNumber SET isPalindrome TO FALSE
SET secondNumber TO temp + secondNumber END IF
END FOR END FOR
PRINT isPalindrome

Intended function: finds the largest and smallest Intended function: checks if a number is perfect (sum
numbers in an array. of its divisors equals the number)
SET numbers TO [8, 7, 2, 4, 6] SET number TO 6
SET largest TO FIRST ELEMENT OF numbers SET sum TO 0
SET smallest TO FIRST ELEMENT OF numbers FOR i FROM 1 TO number
FOR EACH number IN numbers IF number MODULO i EQUALS 0
IF number GREATER THAN largest ADD i TO sum
SET largest TO number END IF
ELSE IF number LESS THAN smallest END FOR
SET smallest TO number IF sum EQUALS number
END IF PRINT number, " is a perfect number"
END FOR ELSE
PRINT largest, smallest PRINT number, " is not a perfect number"
END IF

Intended function: reverses the digits of a given Intended function: reverses the characters in a string
number and prints it SET inputString TO "example"
SET number TO 1234 SET reversedString TO EMPTY
SET reversedNumber TO 0 FOR i FROM LENGTH OF inputString DOWN TO 0
WHILE number > 0 APPEND inputString[i] TO reversedString
SET digit TO number MODULO 10 END FOR
MULTIPLY reversedNumber BY 10 PRINT reversedString
ADD digit TO reversedNumber
DIVIDE number BY 10
END WHILE
PRINT "Reversed Number: ", reversedNumber

Coding with AI - AI as Your Debugging Partner 2


󰗧 Example AI System Prompt ¨
You are an error diagnosis guide. I have a snippet of code that has an error. I would like to discuss error
possibilities with you and potential solutions.
Please help me understand the error first before giving a solution.
Do not provide a solution until I tell you that I understand and am ready for a solution.

💡 Tips for working with the Error Diagnosis Guide 


Tip #1: The AI should provide you with a breakdown of the code, line by line. It is vital that you ask the AI
specific questions about any line or piece of code you don’t fully understand or would like further
insight into.
● Example: Can you give me more detailed insights into [why the result of the condition would be
odd instead of even]?

Tip #2: Make sure you fully understand what the code is doing and have some ideas on the cause of
the error before letting the AI know you are ready to discuss how to correct the code.

Coding with AI - AI as Your Debugging Partner 3


AI Strategies
The strategy below is a way to use AI to support your code debugging.

As you explore the strategy, discuss with your partner and compare which strategies support your
learning. Don’t forget to document your experiences in your AI Strategies Journal.

💬 Debugging Insight Assistant š


More often than not, we have bugs in our code. Everyone gets bugs … even those who
write code for a living! Often, all it takes is discussing our expectations of the code
segment with someone and POOF! We spot and fix the error!
Let’s see if AI can support us with this step.

✅ Instructions 
Goal: Interact with the AI to analyze the code, discuss expectations, and propose solutions.

1. Translate the buggy pseudocode segments below into your chosen programming language.
○ Translate one at a time and interact with the AI with as many code segments as you have
time for.

2. Use the example AI System Prompt to begin interacting with the AI to discuss your expectations
and error possibilities.

3. Based on your interaction with the AI, debug the code and run the segment to see if it works.

Coding with AI - AI as Your Debugging Partner 4


⚠ Buggy Pseudocode p
Intended function: calculate and print the area of a Intended function: convert Celsius temperature to
circle Fahrenheit and print it
SET diameter TO 10 SET celsius TO 100
SET radius TO diameter / 2 SET fahrenheit TO (celsius * 9 / 5)
SET area TO 3.14 * radius PRINT "Temperature in Fahrenheit: ", celsius
PRINT "Area of the circle is: ", radius

Intended function: generate and print a multiplication Intended function: check if a year is a leap year and
table for a given number print the result
SET number TO 5 SET year TO 2020
FOR i FROM 1 TO 10 IF year MODULO 4 EQUALS 0
PRINT number, " * ", i, " = ", number * i IF year MODULO 100 NOT EQUALS 0 OR year
INCREMENT i MODULO 400 EQUALS 0
END FOR PRINT year, " is a leap year"
END IF
ELSE
PRINT year, " is not a leap year"
END IF

Intended function: swap two numbers and print the Intended function: print all even numbers in a given
result range
SET a TO 5 SET start TO 1
SET b TO 10 SET end TO 10
SET temp TO a FOR i FROM start TO end
SET a TO temp IF i MODULO 3 EQUALS 0
SET b TO a PRINT i
PRINT "a: ", b, " b: ", a END IF
END FOR

Intended function: calculate the average of a set of Intended function: reverse the order of words in a
grades sentence
SET grades TO [80, 90, 75, 88] SET sentence TO "Hello world"
SET total TO 1 SET words TO SPLIT sentence BY " "
FOR EACH grade IN grades SET reversedSentence TO EMPTY
ADD grade TO total FOR EACH word IN words
END FOR PREPEND word TO reversedSentence
SET average TO total DIVIDED BY LENGTH OF grades ADD " " TO reversedSentence
PRINT "Average grade is: ", total END FOR
PRINT reversedSentence

󰗧 Example AI System Prompt ¨


You are a debugging insight assistant. I have a snippet of code that has errors. I would like to discuss
error possibilities with you and potential solutions by describing what my expectations of the code is,
step by step and be provided with insights into my expectations.
Do not provide a solution until I tell you that I understand and am ready for a solution.

Coding with AI - AI as Your Debugging Partner 5


💡 Tips for working with the Error Diagnosis Guide 
Tip #1: YOU need to provide a description of what you expect the code to do along with the segment of
code itself. Once you do this, THEN AI should provide you with a breakdown of the code, line by line. It is
vital that you ask the AI specific questions about any line or piece of code you don’t fully understand
or would like further insight into.
● Example: Can you give me more detailed insights into [why the result of the condition would be
odd instead of even]?

Tip #2: Make sure you fully understand the error before letting the AI know you are ready to discuss
how to correct the code.

Coding with AI - AI as Your Debugging Partner 6


Name(s) Period Date

Activity Guide - My Debugging with AI Value Statement

What is my Coding with AI Value Statement?


Figuring out your Coding with AI Value Statement means determining whether you would use AI
when you are programming and, in particular, how and when. Answer the questions in the steps
below to help you establish your Coding with AI Values.

Step 1: AI Decisions

Instructions: Decide whether you would use AI to support debugging during the programming process.

● Would you use AI to debug your code?

*If your answer is no, skip to Step 3

Step 2: Strategy Decisions

Instructions: If you would use AI, identify which strategies are most supportive to your learning and
explain why.

● If you stated in Step 1 that you would use AI, identify which of the two strategies you would use.

● Why you would use those strategies and how they would be supportive to your learning.
○ Consider how the strategy assisted you in this stage of the programming process or how
interacting with the AI influenced your thought process or approach.

Coding with AI - AI as Your Debugging Partner 1


● When during the programming stages would you find this strategy most beneficial? (e.g., before
you even start, when you are stuck, once you have ideas that need to be refined or developed)
○ Think about when you might feel the need to turn to the AI strategy (or strategies), and
what might trigger this need in the future.

Step 3: Value Statement

Instructions: Develop a value statement for each strategy you would use, integrating your insights from
your exploration.
Note: If you answered “no” to the question in Step 1, your value statement will be about why you
would not use each strategy.

● Your value statement should include the following aspects:


○ What - What AI strategies you would use
○ Who - identify your level of CS knowledge
○ When - when you would use the strategies
○ How - how you would use the strategies to support learning

● Example Value statement: When a beginner programmer is stuck getting started with the actual
coding, AI can assist by providing pseudocode for a feature or two to help get started, but it is up
to the student to take the pseudocode and create actual code from it to ensure ownership of the
code and coding practice to continue learning.

Value Statement:

Value Statement:

Coding with AI - AI as Your Debugging Partner 2


Name(s) Period Date

Activity Guide - Reflection Scavenger Hunt

Understand Your Mission:


Your goal is to find classmates who match specific experiences or opinions related to today's AI debugging activity. Each match
you find is an opportunity for a quick, insightful conversation.

1. Once you find a classmate that fits the prompt, engage in a 🗣 brief discussion l with them about the prompt to
understand their perspective
○ ✅ Jot down the name of the classmate
○ 🎯 Ask them to elaborate on the prompt and write down a key point or two from your conversation
○ 💭 Write down your own thoughts about the prompt

Seek Out A Classmate Who …

Believes AI could potentially compromise the Ÿ Key Points:


originality of a programmer’s work.
How:
 Name: _____________________
› My thoughts:
Changed their opinion about the role of debugging Ÿ Key Points:
with AI after today's activities. Old opinion:

 Name: _____________________ New opinion:

› My thoughts:
Coding with AI - AI as Your Debugging Partner 1
Thinks there are certain debugging tasks that 🎯 Key Points:
should only be done by humans, not AI.
Debugging tasks:
✅ Name: _____________________
💭 My thoughts:
Identified a potential ethical dilemma in using AI for Ÿ Key Points:
debugging:
Ethical Dilemma:
 Name: _____________________
› My thoughts:
Can give an example of AI making a debugging Ÿ Key Points:
error and how they corrected it.
AI Error:
 Name: _____________________
› My thoughts:
Feels that using AI in debugging could lead to Ÿ Key Points:
over-reliance on technology.
Why:
 Name: _____________________
› My thoughts:
Believes it is possible to maintain a balance Ÿ Key Points:
between AI assistance and personal coding skills.
How:
 Name: _____________________
› My thoughts:

Coding with AI - AI as Your Debugging Partner 2


Thinks AI can help understand complex code but 🎯 Key Points:
has limitations.
Limitations:
✅ Name: _____________________
💭 My thoughts:
Can share how AI might influence the future of Ÿ Key Points:
programming in either a positive or negative way. Positive:

 Name: _____________________ Negative:

› My thoughts:
Feels that debugging with AI could affect their sense Ÿ Key Points:
of accomplishment in coding.
In what way?
 Name: _____________________
› My thoughts:
Thinks AI can help them become better at Ÿ Key Points:
debugging their own code in the long run.
How:
 Name: _____________________
› My thoughts:
Can describe a scenario where they would prefer Ÿ Key Points:
not to use AI for debugging and explain why.
Scenario:
 Name: _____________________
› My thoughts:
Coding with AI - AI as Your Debugging Partner 3
Believes depending too much on AI for debugging 🎯 Key Points:
might affect the learning process for beginner
programmers. Why/How:

✅ Name: _____________________
💭 My thoughts:
Can share a personal experience where AI in Ÿ Key Points:
debugging led to an unexpected learning Experience:
opportunity.
Learning opportunity:
 Name: _____________________
› My thoughts:
Has a clear idea about balancing the use of AI in Ÿ Key Points:
debugging with maintaining their own coding skills.
Idea:
 Name: _____________________
› My thoughts:

🎉 Insights and Surprises ~


Add any insights or surprises you encountered during your hunt:

Coding with AI - AI as Your Debugging Partner 4


Coding with AI
Beyond the Finished Code
Resources
Name(s) Period Date

AI Chatbot Prompting Guide

Basic Structure of a Prompt


The chatbots we will use are large language models (LLMs). LLMs say things based on what words
and sentences probably come next. As a result, it helps to have some guidance on interacting
with the chatbot to get a satisfactory result.

Note: Regardless of your prompt, the chatbot can still have “hallucinations” and state things as
facts that sound correct but are not true. It is always important to double-check all information
you find online - whether from an AI or a traditional search engine!

Basic Structure of a Prompt:


Acting as a [ROLE] perform [TASK] in [FORMAT]

Act as a [ROLE] Create a [TASK] Show as [FORMAT]


Researcher Detailed Answer List
Journalist Summary Summary
Analyst Analysis Table
Historian Product Description Simple Terms
Thought Partner Outline 2-3 Examples/Answers
Teacher Instructions Code

Examples:
Acting as a thought partner, discuss new fundraising ideas with me by providing a list of ideas
with reasons behind each list item.

Acting as a critic, analyze these fundraising ideas I created. Are there any I missed? Which ones
seem particularly good or bad? Provide the analysis in simple terms.
Tips and Tricks
1. Write clear and specific instructions. Since the LLMs try to follow instructions, make the
instructions as detailed as possible. Longer prompts usually are better and provide more
information than shorter prompts. This also includes giving the model an example of the output
you expect before it completes the task.

2. Limit the LLM response. If the output is too long, tell the model to be specific on length. For
example: Use 2-3 sentences, provide 3-4 list items, or use 50 words at most.

3. Reduce hallucinations by splitting up the task. When the task involves finding factual
information, ask the LLM to find relevant information FIRST, then ask it to answer the question
based on the pertinent information that it found. You can also ask the LLM to cite its sources!

4. Be specific about the audience. Tell the model who the audience is (5th graders, teenagers,
college graduates, etc) and how much or what the audience knows (limited knowledge,
beginners, expert in the field ).

5. Simplify the response to gain clarity or a deeper understanding. When you need to
understand the model’s complicated response, tell the model to simplify its response using one of
the example prompts:

● Explain [insert specific topic] in simple terms.


● Explain to me like I’m 11 years old.
● Explain to me as if I’m a beginner in [field].

Key Terms Tones


Act as: The role/character: e.g., professional Defining the tone that the model
Tones: How to speak: friendly, professional, funny, etc should give its responses can be
Clarity: Be clear about what you want helpful. Examples: friendly,
Specify: Specify your needs without unnecessary professional, funny, sad, thrilling,
additions exciting, adventurous, informative,
Details: Give organized details to cover all the prospects progressive, stable, consistent,
Format: Try to show the format of the result you wish trendsetting, innovative, etc.
Avoid: Always set which things it should avoid
Summary of Things to Do in Your Prompt
1. Set the context: Start by specifying the role you want the model to play. This helps set the
expectations and provides a frame of reference for the generated responses.

2. Define the task: Describe the specific task or action the model should perform. This will clarify
the desired outcome.

3. State the requirements: Clearly state what you need from the model, such as a
recommendation, solution, or answer. This helps narrow down the focus of the conversation.

4. Specify the desired format: Indicate the format or structure in which you would like the final
result to be presented. This ensures the generated output aligns with your expectations.

5. Provide details: Specify any additional details or considerations that should be considered
during the task.

6. Mention restrictions: Clearly state any limitations or restrictions that should be followed. This
helps avoid generating responses that are not suitable or desired.

7. Provide examples: Include examples to give the model a reference point and help it
understand the type of response you are looking for. This can improve the quality and relevance
of the generated answers.

Remember, assigning the model a specific role and providing a straightforward task with clear
format instructions through a well-constructed prompt increases the likelihood of obtaining
accurate and helpful responses.
Name(s) Period Date

Activity Guide - My Value Statement for using AI with Finished Program

What is my Coding with AI Value Statement?


Figuring out your Coding with AI Value Statement means determining whether you would use AI
when you are programming and, in particular, how and when. Answer the questions in the steps
below to help you establish your Coding with AI Values.

Step 1: AI Decisions

Instructions: Decide whether you would use AI with a finished program.

● Would you use AI with your finished program?

*If your answer is no, skip to Step 3

Step 2: Strategy Decisions

Instructions: If you would use AI, identify which strategies are most supportive to your learning and
explain why.

● If you stated in Step 1 that you would use AI, identify which of the two strategies you would use.

● Why you would use those strategies and how they would be supportive to your learning.
○ Consider how the strategy assisted you in this stage of the programming process or how
interacting with the AI influenced your thought process or approach.

Coding with AI - Beyond the Finished Code 1


● When during the programming stages would you find this strategy most beneficial? (e.g., before
you even start, when you are stuck, once you have ideas that need to be refined or developed)
○ Think about when you might feel the need to turn to the AI strategy (or strategies), and
what might trigger this need in the future.

Step 3: Value Statement

Instructions: Develop a value statement for each strategy you would use, integrating your insights from
your exploration.
Note: If you answered “no” to the question in Step 1, your value statement will be about why you
would not use each strategy.

● Your value statement should include the following aspects:


○ What - What AI strategies you would use
○ Who - identify your level of CS knowledge
○ When - when you would use the strategies
○ How - how you would use the strategies to support learning

● Example Value statement: When a beginner programmer is stuck getting started with the actual
coding, AI can assist by providing pseudocode for a feature or two to help get started, but it is up
to the student to take the pseudocode and create actual code from it to ensure ownership of the
code and coding practice to continue learning.

Value Statement:

Value Statement:

Coding with AI - Beyond the Finished Code 2


Name(s) Period Date

Activity Guide - Beyond the Finished Program

Instructions
Fill in the boxes below with your new program feature ideas or improvements when finished
interacting with the AI.

Feature Expansion
Based on your interaction with the AI, sketch or write down a brief plan of how the features could
be integrated into the program.

User Feedback Analysis


Based on your interaction with the AI, brainstorm and document potential new features or
improvements.

Coding with AI - Beyond the Finished Code 1


Name(s) Period Date

Activity Guide - Ethical Speed Chat

Your Goal
Your goal is to discuss one prompt at a time with each partner (prompt #1 with the first partner,
prompt #2 with the second partner, etc). Follow these steps:

1. Once you pair up with a classmate in the circle facing you, engage in a 🗣 brief discussion
l with them about the prompt to understand their perspective
○ ✅ Jot down the name of the classmate
○ 🎯 Write down a key point or two from your conversation
○ 💭 Write down your own thoughts about the prompt
○ 🔃 Rotate when the time is up to discuss the next prompt with your new partner
○ ⌛ HURRY! You only have 2 minutes for each prompt!

Prompt #1: What are the responsibilities of developers in preventing AI from


perpetuating biases or discrimination?

Ÿ Key Points:
 Name: _____________________
› My thoughts:

Prompt #2: How should AI-generated ideas and content be credited or owned? What
are the implications of intellectual property rights?

Ÿ Key Points:
 Name: _____________________
› My thoughts:

Coding with AI - Beyond the Finished Code 1


Prompt #3: Where is the line between helpful AI suggestions and infringement on
creative freedom in software development?

🎯 Key Points:
✅ Name: _____________________
💭 My thoughts:

Prompt #4: Should AI be allowed to make decisions that could significantly impact
human lives? What limits should be in place?

Ÿ Key Points:
 Name: _____________________
› My thoughts:

Prompt #5: How can we ensure that AI respects user privacy while still providing
personalized experiences?

Ÿ Key Points:
 Name: _____________________
› My thoughts:

🎉 Insights and Surprises ~


Add any insights or surprises you encountered during your Speed Chats:

Coding with AI - Beyond the Finished Code 2


Name(s) Period Date

Activity Guide - Strategies for Using AI with Finished Program

AI Strategies
The strategy below is a way to use AI when you are finished developing a program.

As you explore the strategy, discuss with your partner and compare which strategies support your
learning. Don’t forget to document your experiences in your AI Strategies Journal.

💬 Feature EnhanceMate š
Almost every application out there can be improved. Sometimes, it takes
chatting with someone (or something) to get ideas for improving and
expanding our programs. Let’s see if AI can support us with this.

✅ Instructions 
Goal: Interact with the AI to get creative feature ideas or improvements.
1. Pick one of the programs listed here:
○ Cultural Exchange App
○ Local Art Scene Explorer
○ Amateur Astronomer’s Assistant
○ Your own finished program
2. Read through your chosen program’s detailed description to understand its
functionality.
3. Use the example AI System Prompt to begin interacting with the AI to discuss possible
feature expansion ideas.
4. Based on your interaction with the AI, sketch or write down a brief plan of how the
features could be integrated into the program on the Beyond the Finished Code
activity guide.

Coding with AI - Beyond the Finished Code 1


💡 Detailed Program Descriptions 
Cultural Exchange App
● A program that connects users from different countries for language and cultural exchange
● Functionality:
○ Connects users from different countries.
○ Offers basic chat functionality and profile viewing.
● Capabilities:
○ Users create profiles with their language skills and cultural interests.
○ The platform matches users for language practice and cultural discussions.
○ Basic text-based communication between users.

Local Art Scene Explorer


● A mobile app designed to help users discover local art events, exhibitions, and artists in their area
● Functionality:
○ Provides listings of upcoming local art events and exhibitions.
○ Offers basic information about local artists and their work.
○ Includes a calendar feature for users to keep track of events they are interested in.
● Capabilities:
○ Users can search for art events by date or location.
○ Access details about artists and their portfolios.
○ Save and manage a personal calendar of art events they plan to attend.

Amateur Astronomer's Assistant


● An app designed for amateur astronomers, providing information about celestial events, star
charts, and astronomical phenomena.
● Functionality:
○ Includes a calendar of upcoming celestial events (e.g., meteor showers, eclipses).
○ Offers interactive star charts based on the user's location.
○ Provides educational content about various celestial bodies and phenomena.
● Capabilities:
○ Users can explore star charts and identify constellations and planets.
○ Stay informed about upcoming astronomical events and how to view them.
○ Learn about different celestial objects and astronomical concepts.

󰗧 Example AI System Prompt ¨


You are a program feature enhance-mate. Your job is to provide 2-3 creative feature
expansion ideas or program improvements about a finished program.
After entering the prompt above, the AI should ask you to tell it about your program. Use the
detailed description for your chosen program.

Coding with AI - Beyond the Finished Code 2


💡 Tips for working with the Program Feature Enhance-mate 
Tip #1: Does AI consider accessibility and marginalized users when giving you suggestions? What
about bias and discrimination? AI is better at considering accessibility and not being biased if you
explicitly tell it to!
● Example: The suggestion to add a social sharing feature seems biased against senior citizens
and doesn’t consider any accessibility issues. Please make sure you take into consideration all
age groups and accessibility when providing suggestions.

Tip #2: Give the AI your program’s functionality and capabilities in a numbered list. This will make it
easier for the AI to parse out the information.

Tip #3: Ask for clarification on any of the expansion ideas to get more details - the more details you
get, the better you can modify the ideas to your liking!
● Example: Can you give me more detailed insights into [the social sharing feature]?

Tip #4: Ask the AI how a suggested feature idea might be implemented into the program to help you
better understand the suggestion and its implications for the program and its users.

Tip #5: Ask for 2-3 more feature expansion ideas if the first ones provided are not interesting to you.

Tip #6: Sometimes, asking the AI to do a task it is already doing by using different wording helps get
different answers. For example, ask the AI for what functionality or capabilities you might have left out.
● Example: What functionality or capabilities does it seem like I may have left out of my app?

Tip #6: Try asking how AI can be used to help with any of the suggested improvements!

Coding with AI - Beyond the Finished Code 3


AI Strategies
The strategy below is a way to use AI when you are finished developing a program.

As you explore the strategy, discuss with your partner and compare which strategies support your
learning. Don’t forget to document your experiences in your AI Strategies Journal.

💬 Insight Analyst š
User feedback is vital for improving our programs! They can often reveal ideas
for new features or give us insight into potential improvements. The hard part is
going through all that data and extracting common themes and pain points
from user comments. Let’s see if AI can support us with this.

✅ Instructions 
Goal: Interact with the AI to identify common themes or pain points a user might have in the app.

1. Pick one of the programs listed here:


○ Culinary Creator - A cooking app featuring a variety of recipes with step-by-step
instructions, including a grocery list feature and user interaction options

○ Pet Care Companion - A comprehensive pet care app providing health tracking, diet
suggestions, activity monitoring, and social features for pet lovers

○ Music Jam Session - An interactive app for music enthusiasts to play, record, and
collaborate on various instruments, offering tools for learning and improvisation.

○ Your own finished program - make sure you have user feedback and reviews!

2. Use the example AI System Prompt and the User Feedback Handout for your chosen program to
begin interacting with the AI to identify common themes or pain points.

○ Depending on your AI model, you can copy and paste the data or attach the document for
the AI to analyze.

3. Based on your interaction with the AI, brainstorm and document potential new features or
improvements on the Beyond the Finished Code activity guide.

Coding with AI - Beyond the Finished Code 4


󰗧 Example AI System Prompt ¨
You are an insight analyst. your job is to analyze user feedback and reviews for my app and
provide insights into common themes or pain points so that I can then figure out
improvements for my program.
I will provide you with user feedback statements. Please do not provide insights for every
single user feedback response. Instead, please group your analysis into the top 3 most
common themes and pain points.

💡 Tips for working with the Insight Analyst 


Tip #1: Is the AI giving insight that could be biased or discriminatory to any users? AI is better at not
being biased or discriminatory if you explicitly ask it to!
● Example: A common theme you identified is biased toward senior citizens. Please make sure
you take into consideration all age groups when providing insights and suggestions.

Tip #2: Ask for more detail on one of the features to better understand the analysis.
● Example: Can you give more detail on the [Personalization and Recommandations]? Is this a
common theme or pain point, and why?

Tip #3: Splitting up the common themes and pain points might be helpful. Ask the AI to identify
comment themes, then ask it to identify the top 3 pain points.

Tip #4: Ask the AI how an improvement or new feature idea might be implemented into the program to
help you better understand the analysis, any suggestions, and their implications to the program.

Tip #5: Any time the AI gives you a lot of information and you feel overwhelmed, try focusing on just the
first one or two. Or adjust the question you just asked and limit the AI’s results by putting a number limit
on them.
● Example: How can user interaction and engagement be implemented into the app? Please
provide 2-3 suggestions.

Tip #6: Try asking the AI to use simpler language or to explain its insight in 20 words or less. This might
make understanding what the AI is trying to tell you much easier!

Coding with AI - Beyond the Finished Code 5


Handout - Program User Feedback

Instructions
Depending on your AI model, you can copy and paste the user feedback data or attach this
document for the AI to analyze.

🍽 Culinary Creator
App Description: A cooking app featuring a variety of recipes with step-by-step instructions,
including a grocery list feature and user interaction options

User Feedback:
"Needs more diverse recipes, especially international cuisine."

"I love the step-by-step guide but want videos, not just text."

"The grocery list feature is handy, but it should sync with local stores."

"It's hard to navigate through different recipe categories."

"Would be great if it could suggest recipes based on what’s in my fridge."

"A community feature to share our own recipes would be amazing."

"An interactive timer for cooking would be helpful."

"Wish it had a feature to adjust recipes for different serving sizes."

"I really enjoy the app, but it would be great if it had a feature for rating and reviewing the recipes
after trying them out."

"I’m a beginner in the kitchen, and some step-by-step video guides would make the cooking
process much clearer for me."

"It's a good app, but I'm missing a function to filter recipes by cooking time – sometimes I need
something quick!"

"An interactive shopping list that could be shared with family members would be super helpful for
planning meals."

Coding with AI - Beyond the Finished Code 1


🐢 Pet Care Companion
App Description: A comprehensive pet care app providing health tracking, diet suggestions,
activity monitoring, and social features for pet lovers

User Feedback:
"The health tracking is helpful, but I wish it included more specific symptoms for different pet
illnesses."

"Love the diet suggestions, but it needs options for pets with special dietary needs."

"The activity monitor doesn’t always sync with my phone."

"It would be great if the app could remind me of upcoming vet appointments."

"Needs a feature to connect with local pet owners for playdates."

"The social feature is nice, but I’d like to see more about pet adoption services."

"A tutorial for first-time pet owners on basic care would be really helpful."

"I’d appreciate a feature for tracking my pet’s vaccinations and medical history."

"It’s a bit challenging to navigate through the different sections of the app."

"I wish there was a way to personalize the app based on the type of pet I have."

"A 24/7 vet chat service for quick advice would be amazing."

"Should include more interactive games I can play with my pet."

"It would be helpful if the app could recommend pet-friendly places nearby."

"The grooming tips are good, but videos would be more helpful than text."

"An option to set reminders for feeding times would be useful."

Coding with AI - Beyond the Finished Code 2


🎶 Music Jam Session
App Description: An interactive app for music enthusiasts to play, record, and collaborate on
various instruments, offering tools for learning and improvisation.

User Feedback:
"Needs a wider range of instruments to choose from."

"It would be cool if we could record and share our jam sessions."

"Lacks a feature for virtual collaboration with other musicians."

"Should include tutorials for beginners on different instruments."

"Wish it had a feature to suggest chords and scales for improvisation."

"It's hard to synchronize the beat with other virtual instruments."

"The sound quality is good but could be more realistic."

"An option to create and save setlists would be helpful."

"Would be nice to have a metronome and tuner built-in."

"Should include a way to adjust the difficulty level of play-alongs."

"It’s fun to play with, but I wish there was a way to adjust the volume of each instrument
individually for a better mix."

"A feature for tempo adjustment in the jam sessions would be great for practicing at different
speeds."

"I’d love to see a feature where you can challenge friends to jam sessions and compare your
creations."

"It's a decent app, but adding a variety of drum beats and rhythms to play along with would
enhance the experience."

"I'm enjoying the app, but a tutorial mode to learn new instruments would make it even more
valuable for beginners."

Coding with AI - Beyond the Finished Code 3

You might also like