Ravindra BagaleCourses & study guides Track your progress

AI Coding Tools Compared: GitHub Copilot, Cursor and Claude Code

Generative AI course · Chapter 35 · Estimated reading time: 11 minutes

Once you can write a little Python, a chat window starts to feel slow. You copy code from the chat, paste it into your file, copy the error back, and repeat. AI coding tools remove that copying: they work inside your editor or your terminal, read your project files, and can make the change themselves. The three names you will hear most are GitHub Copilot, Cursor and Claude Code. They are not the same kind of tool, and their plans changed a lot in 2026. In this chapter you will fix the same bug in all three, ask each to write tests and a README, and pick the right tool for where you are today.

What you will learn in this chapter

  • The 3 kinds of AI coding help: completion, chat and agent
  • What GitHub Copilot, Cursor and Claude Code are, in one line each
  • What each plan gives in October 2026, from the official pages
  • Fix the same bug in all 3 tools
  • Ask AI to write tests, and run them yourself
  • Ask AI to write a README for your project
  • How to choose, and the safety rules for agents

Related guide

Want Claude Code on Windows with a first Python fix? Read Claude Code for Beginners: Install and First Project (India) for install, Pro plan notes and a pytest example.

Related guide

Want Cursor Free plan and India pricing notes with a first project? Read Cursor AI Free Plan and Pricing in India: Download and First Project.

Related guide

Moving from editors to multi-agent frameworks? Read LangGraph vs CrewAI for Freshers: Your First Multi-Agent Mini Project for a fresher CrewAI vs LangGraph mini project.

Related guide

Trying AWS Kiro Spec mode as a beginner in India? Read AWS Kiro for Beginners: Spec-First Coding (India Students).

1. Suppose a small bug costs a shop money

Suppose our friend Anil runs a small online store, and his Python code calculates the price after a discount. A customer buys an item for Rs 500 with a 10% discount and pays Rs 490 instead of Rs 450. The code is wrong:

def final_price(price, discount_percent):
    """Price after a percentage discount, rounded to 2 decimals."""
    return round(price - discount_percent, 2)

It subtracts 10 rupees instead of 10 percent. A tiny bug, but on every order. We will use this one file to compare the three tools fairly.

2. Three kinds of AI help

Kind What it does Example
Completion Suggests the next line or block as you type; press Tab to accept Copilot's code completions, Cursor Tab
Chat You ask questions about your code in a side panel Copilot Chat, Cursor Chat
Agent You give a task; it reads files, edits several files and runs commands, asking you before risky steps Copilot agent mode, Cursor Agent, Claude Code

A beginner gets the most from chat first (understanding), then completion (speed), then agents (bigger tasks). Agents are powerful, so they need the most care.

Choosing an AI coding tool in five questions Steps from top to bottom: 1 Still learning basics?, A free chat tutor first; 2 Student or teacher?, Check free Copilot offers; 3 Keep your editor?, Copilot in VS Code; 4 Want an AI-first editor?, Cursor, start on Free; 5 Big tasks in a terminal?, Claude Code, paid plan. 1Still learning basics?A free chat tutor first 2Student or teacher?Check free Copilot offers 3Keep your editor?Copilot in VS Code 4Want an AI-first editor?Cursor, start on Free 5Big tasks in a terminal?Claude Code, paid plan

Choosing an AI coding tool in five questions

3. The three tools, and their plans (October 2026)

All plan details below were checked on each company's official page on 23 October 2026. Prices are in US dollars per month and can change; check before you buy.

GitHub Copilot works inside editors such as VS Code and on github.com. Copilot plans now measure chat and agent work in GitHub AI Credits; code completions are not billed in credits.

Plan Price What you get
Copilot Free $0 2,000 code completions a month, limited chat and agent use, automatic model choice only
Copilot Pro $10 Unlimited completions, 1,500 AI credits a month (1,000 base plus 500 flex), a choice of models
Copilot Pro+ $39 7,000 AI credits a month
Copilot Max $100 20,000 AI credits a month

Credits reset on the 1st of each month and do not carry over. Verified students can get Copilot Student free, and verified teachers and maintainers of popular open-source projects may get Pro free.

Cursor is a complete code editor (built on the same base as VS Code) with AI everywhere. New customers see these plans:

Plan Price What you get
Free $0 Limited Agent, Chat and Tab
Plus $8 More usage; only Grok models on this plan
Premium $30 4 times the usage of Plus; other companies' models available, billed by usage
Super $100 15 times the usage of Plus
Ultra $200 50 times the usage of Plus

Older plans (Hobby and Pro) continue only for existing customers.

Claude Code by Anthropic is an agent that runs in your terminal (and also as a desktop app). It is not free: it needs a paid Claude plan (Pro or higher) or an Anthropic Console account billed by API use. The free claude.ai plan does not include it.

Install on Mac, Linux or Windows WSL:

curl -fsSL https://claude.ai/install.sh | bash

On Windows PowerShell:

irm https://claude.ai/install.ps1 | iex

Then check and log in:

claude --version
claude doctor
claude

Ravindra Bagale's Tip

The mistake I see most: people buy the biggest plan of the most talked-about tool on day one, then use it for autocomplete. Start free. Use Copilot Free or Cursor Free for a month and notice what you actually ask for. If you mostly want explanations, a free chat is enough. If you hit the limit every week on real work, then upgrade one plan at a time.

4. Worked example 1: the same bug fixed in 3 tools

First, we wrote two small tests so we can prove whether the code is right (a test is a few lines that check an answer):

from shop import final_price

def test_ten_percent():
    assert final_price(500, 10) == 450.0

def test_no_discount():
    assert final_price(250, 0) == 250.0

Real output of python -m pytest -q on the buggy code (23 October 2026):

F.                                                                       [100%]
=================================== FAILURES ===================================
_______________________________ test_ten_percent _______________________________

    def test_ten_percent():
>       assert final_price(500, 10) == 450.0
E       assert 490 == 450.0
E        +  where 490 = final_price(500, 10)

test_shop.py:4: AssertionError
=========================== short test summary info ============================
FAILED test_shop.py::test_ten_percent - assert 490 == 450.0
1 failed, 1 passed in 0.01s

Now the same request in each tool. The prompt is the same:

test_ten_percent fails: final_price(500, 10) gives 490 but should give 450.
Fix final_price in shop.py. Explain the bug in one line. Do not change the tests.
  1. GitHub Copilot (VS Code): open shop.py, open Copilot Chat, paste the prompt.
  2. Cursor: open the folder in Cursor, open the Agent panel (or Chat), paste the prompt.
  3. Claude Code: open a terminal in the project folder, type claude, paste the prompt.

Expected output (yours will be similar, not the same): all three explain that the code subtracts the discount as rupees instead of a percentage, and propose price * (1 - discount_percent / 100). Copilot Chat and Cursor show the change as a diff (red line removed, green line added) for you to accept. Claude Code shows the planned edit and asks permission before writing the file, and it may offer to run the tests.

Run the tests yourself after any tool's fix. The fix is only proven when the tests pass, not when the AI says "done".

5. Worked example 2: ask AI to write tests

Two tests are not enough. What about a 100% discount, or someone typing 120%?

The prompt (any of the three tools):

Write pytest tests for final_price in shop.py. Cover: 10% off, no discount,
100% off, a price with paise that needs rounding, and a discount above 100
which should raise ValueError. If the function does not handle a case, update it.

Expected output (yours will be similar, not the same): a test file with about 5 tests, and a small change to final_price that rejects discounts outside 0 to 100. Here is the version we checked:

def final_price(price, discount_percent):
    """Price after a percentage discount, rounded to 2 decimals."""
    if not 0 <= discount_percent <= 100:
        raise ValueError("discount_percent must be between 0 and 100")
    return round(price * (1 - discount_percent / 100), 2)

Real output of python -m pytest -v (23 October 2026):

test_shop.py::test_ten_percent PASSED                                    [ 20%]
test_shop.py::test_no_discount PASSED                                    [ 40%]
test_shop.py::test_full_discount PASSED                                  [ 60%]
test_shop.py::test_rounding PASSED                                       [ 80%]
test_shop.py::test_bad_discount PASSED                                   [100%]

============================== 5 passed in 0.01s ===============================

Read the tests AI writes. A common AI trick is a test that always passes, or a test changed to match the buggy answer. Check each expected number yourself: 99.99 with 15% off is 84.9915, which rounds to 84.99.

6. Worked example 3: a README

A README is the first page people see in a project: what it does and how to run it.

The prompt:

Write a short README.md for this project. Sections: what it does (2 lines),
how to install (pip install pytest), how to run the tests, an example of
final_price, and a "Known limits" section. Use only facts from the code;
do not invent features.

Expected output (yours will be similar, not the same): a README of about 20 lines with headings, an install command, python -m pytest, an example such as final_price(500, 10) giving 450.0, and a known limit such as "does not add tax".

Check it: run every command in the README yourself. If AI wrote a feature that is not in the code ("supports coupons"), delete that line.

7. How to choose

If you... Start with
Are a student who can verify student status Copilot Student (free) in VS Code
Want help inside the editor you already use Copilot Free in VS Code
Want an editor where AI is built into everything Cursor Free
Are comfortable in the terminal and want an agent for bigger tasks Claude Code (paid plan needed)
Are still learning the basics Any free chat as a tutor first (see the previous chapter)

Safety rules for any agent:

  1. Work in a Git project and commit before you ask for a big change, so you can undo it.
  2. Read the plan and the diff before you accept.
  3. Do not let an agent run commands you do not understand, especially ones that delete or install things.
  4. Keep keys and passwords out of chats and out of code files (the next chapter shows how).
  5. Run the tests yourself.

8. Worked example 4: open a folder in Cursor and explain one file

Suppose Prakash has a small Python folder bill_shop/ with total.py that adds invoice lines. He installs Cursor (Free plan available; Pro pricing in India changes — check cursor.com). This is the safest first agent step: read and explain, do not edit yet.

Steps:

  1. Open Cursor → Open Folder → select bill_shop.
  2. Open Chat / Agent. Paste:
Read total.py only. Explain in simple English: what inputs it expects,
what it prints, and one risk if a price cell is empty.
Do not edit any file yet.

Expected output (yours will be similar, not the same): a plain explanation of the file. Health-check phrase: EXPANDOCT23-CURSOR-FIRST-FOLDER. Only after you understand it, ask for a small edit.

9. Worked example 5: fix a traceback with Claude Code

Suppose total.py crashes with ValueError: could not convert string to float: 'N/A'. Claude Code (CLI / desktop; needs a paid Claude plan — confirm on Anthropic) works well in a real folder.

Prompt in the project folder:

I get ValueError when a CSV cell is 'N/A'. Fix total.py so bad cells become 0 and print a warning line.
Add a tiny test file test_total.py. Do not touch .env or any secrets file.

Steps:

  1. Review the diff yourself before accepting.
  2. Run the test.
  3. Commit only after you understand the change.

10. Worked example 6: task + review in Google Antigravity

Google Antigravity is an agent-first coding tool rising fast in India traffic lists in late 2026. Treat it like any agent: give a small task, then review the diff. Availability and plans change — check Google's page. (ChatGPT Codex-style PR review is a similar habit: never merge an agent diff you did not read.)

Task prompt:

Make a tip calculator: amount, tip percent, number of people. Print each person's share.
Use one Python file. No network calls. After coding, show me the diff summary in 5 bullets.

Review checklist:

  1. Does it run with sample numbers 1000, 10%, 4 people?
  2. Did it add packages you do not need?
  3. Did it ask to commit secrets? If yes, stop.

Ravindra Bagale's Tip

Agents look confident when they rewrite half your repo. Your job is the review. Small tasks, read every diff, keep secrets out of the chat.

11. Beginner mistakes and quick fixes

Mistake What happens Quick fix
Accepting every suggestion with Tab Wrong code you do not understand Read each suggestion; reject when unsure
Trusting "Fixed!" without tests The bug comes back later Write a test first, then fix, then run it
Letting AI change the tests to pass Tests stop protecting you Say "do not change the tests"
No Git before an agent task Cannot undo a bad change Commit first
Buying the top plan on day one Money spent on unused credits Start free; upgrade one step when you hit limits
Pasting API keys into a chat Keys can leak Use a .env file and never share it

12. Try at home

Try at home

Task 1: the discount bug

  1. Create shop.py with the buggy function and test_shop.py with the two tests.
  2. Run python -m pytest -q and see it fail.
  3. Fix it with any free tool and run the tests again.

Task 2: more tests

  1. Ask the tool for 3 more tests.
  2. Check every expected number by hand.
  3. Remove any test that only repeats another.

Task 3: a README

  1. Ask for a README using only facts from the code.
  2. Run every command in it.
  3. Delete any line that describes a feature you do not have.

Recap

In short

  1. AI coding help comes in 3 kinds: completion, chat and agent.
  2. GitHub Copilot lives in your editor; Free gives 2,000 completions a month, and Pro is $10 a month with 1,500 AI credits (October 2026).
  3. Cursor is an AI code editor; new plans are Free, Plus $8, Premium $30, Super $100 and Ultra $200 a month.
  4. Claude Code is a terminal agent and needs a paid Claude plan or API billing.
  5. A test proves a fix; AI saying "done" does not.
  6. Read the tests and the README AI writes, and check them against the code.
  7. Commit in Git before agent tasks, and read every diff.
  8. Start free and upgrade only when you hit limits on real work.
  9. Start Cursor with explain-only, use Claude Code for a small traceback fix, and review every Antigravity (or Codex-style) agent diff before you trust it.

Fix one real bug this week with a test written first. The tool matters less than the habit: test, fix, read the diff, test again.

Previous chapter: Learn Python with ChatGPT: Write, Run and Fix Your First Programs

Next chapter: Your First OpenAI and Gemini API Call in Python (Free Key Setup)


Ravindra Bagale, trainer: linkedin.com/in/ravindra-bagale. Anil, his store and the prices on this page are made up for learning. Plans and prices were checked on GitHub's Copilot plans page, Cursor's pricing page and Anthropic's Claude Code documentation on 23 October 2026; they change often. The test output was produced on 23 October 2026 with Python 3.13 and pytest. AI output changes every time, so your output will be similar, not the same.