Built for curious beginners

Understand the code.
Learn the why.

Meet a coding mentor that helps you make sense of errors, review snippets, and learn programming concepts through clear, step-by-step explanations.

◇   A learning-focused project. You stay in control of your code.
practice.pyPython

A small bug. A useful lesson.

def average(numbers):
    total = sum(numbers)
    return total / len(number)

scores = [70, 85, 90]
print(average(scores))
✦ Mentor explanation

Likely issue: the function receives numbers, but the return line uses number. Those names do not match. Use len(numbers) to count the items in the list.

Learn by understanding

Less guesswork.
More learning.

CodeMentor AI is designed to help learners understand what went wrong and what to practise next—not just copy a fix.

✳

Understand errors

Describe an error or unexpected output and get a plain-language explanation of what may be causing it.

</>

Review code snippets

Ask for likely bugs, readability improvements, and practical suggestions for the code you share.

▤

Learn line by line

Request a high-level overview or a line-by-line walkthrough that makes unfamiliar code easier to follow.

✧

Get problem-solving hints

Ask for an algorithm hint or a nudge toward the next step when you want to solve a problem yourself.

☷

Choose your help mode

Select a programming language and the kind of help that fits the question you are working on.

◇

Keep API keys out of code

The starter project is designed to read its Anthropic API key from an environment variable rather than hard-coding it.

A simple workflow

From confusion to clarity.

Focus the conversation on the specific thing you want to understand.

01

Share the problem

Choose a help mode and language, then paste a code snippet and explain what you expected to happen.

02

Explore the explanation

Use the AI-generated response to examine the likely issue, suggested correction, and relevant concept.

03

Practise the concept

Apply the idea to your code, test the result, and use follow-up questions to deepen your understanding.

Explore the project

Build understanding, one bug at a time.

CodeMentor AI is an early-stage MVP and learning project. Explore the source code, review the setup instructions, or contribute ideas through GitHub.

View on GitHub ↗