EC1B1 Python Coding SupportFollow-up resources for LSE BSc Economics
← Back to all posts

23 Jan 2026

Session 1 Summary: Python + AI Setup

Kickoff session covering Colab, Gemini, Cursor, and the reverse-engineering learning loop.

Session overview

This coding support session introduced Python as the first programming language for economists and walked through the core tools students will use: Google Colab for quick notebook practice and Cursor for multi-file coding with AI assistance.

Key topics covered

  • Colab basics: notebooks are organized into text cells (Markdown) and code cells that run on a

    hosted runtime.

  • Saving your own copy: do not edit the shared notebook directly; use File → Save a copy in Drive.

  • Gemini in Colab: use the “Toggle Gemini” icon to ask for explanations, examples, or concept

    walkthroughs.

  • Reverse engineering learning: ask AI to generate a small solution, run it, and then ask for a

    line-by-line explanation before modifying it yourself.

  • Cursor introduction: a more advanced AI coding environment that supports Tab completion,

    inline edits, chat, and multi-file agents (with your review).

  • Verification habits: AI output must be checked for correctness; you remain responsible for the

    results you submit.

Refer to the recording of the session for a more detailed explanation of the topics covered.

Things we didn't cover, but still useful to know

Free tiers and pricing

Colab is completely free to use. The Gemini AI integrated into Colab is also free as long as you use Gemini 2.5 Flash. If you want to use Gemini 3 Pro, you will need to buy a subscription. More information: https://colab.research.google.com/

Cursor has a free version that has almost all the functionality of the paid version. You may run into usage limits if you use it very intensely, although I don't think that will be the case for the type of use you will be doing. I will give you some practical tips on how to save your usage by using specific models in the next few sessions. More information: https://cursor.com/pricing

Alternative tools

There are a few alternatives to the tools that we discussed:

  • Antigravity is similar to Cursor, but it's provided by Google for free. While it doesn't have all the functionality of Cursor, it is still a very good substitute. More information: https://antigravity.google/

  • GitHub Copilot is available for users of GitHub, a platform where code is saved on the cloud, and designed for collaboration in coding development. GitHub Copilot offers a free tier for students and teachers, and a paid subscription for others. More information: https://github.com/features/copilot

These are all options that you can explore if you want to.

Advanced terminal tools

Finally, there are some tools that work directly in the terminal. These are more advanced and I will not recommend a beginner to start using them, but if you are already familiar with Python, it might be a good idea to start using these tools:

  • Claude Code is the most prominent one. More information: https://code.claude.com/docs/en/overview. Notice that, while LSE has a partnership with Anthropic that gives you access to Claude, the agreement does not cover the use of Claude Code, so you will need to use your own account to access the service, and pay for the usage.

  • Gemini CLI allows you to interact with Google's Gemini models from the command line. More information: https://ai.google.dev/tools

  • Cursor CLI is Cursor's command-line interface. More information: https://cursor.com/docs

These are much more advanced than what you are expected to learn in your first year at LSE, but feel free to have a look at them.

Reminders from the session

  • A Google account is required to save a personal Colab notebook copy.

  • Avoid auto-filling exercises with AI at the beginning — practice the basics first.

  • Use AI to explain code and concepts, not to skip the learning process.

A few exercises to practice

Here are some prompts you can use to practice — designed for "reverse engineering" and active learning:

Colab + Gemini

  • "Write Python code to calculate the percentage growth from an initial value of 120 to a final value of 150. Explain each step."

  • "Show how to use a for loop to print every even number from 1 to 10, then explain the logic line-by-line."

  • "Convert the string '19.99' to a float and round it to the nearest integer. Explain each operation."

Cursor

  • "Create a Python script that loads GDP data from a list (e.g., [2300, 2350, 2400, 2430]), computes quarterly growth rates, and prints them. Then, explain your code line-by-line."

  • "Write code to check if a number is divisible by 3 or 5. Afterwards, explain how the conditions work and try changing the numbers."

  • "Make a bar chart of three sample GDP per capita values (UK, France, Germany) using Matplotlib. Add title and labels. Explain how to change the bar colors."

Tips:

  • Always ask for code explanations after generating a solution.

  • Change a line or parameter yourself—observe and explain what changes.

  • Try running a prompt without AI help after reviewing an AI-generated solution.


Related resources