Ai Coding Tools

How to Use Cursor to Write Your First 100 Lines of Code

By BTW Team4 min read

How to Use Cursor to Write Your First 100 Lines of Code

If you're diving into coding for the first time, it can feel like you're staring at a blank canvas, unsure of where to start. I remember my first experience with coding—it was exciting but overwhelming. In 2026, tools like Cursor are designed to make this journey easier, especially for beginners. Cursor is an AI-powered coding assistant that helps you write code faster and with fewer errors. Let's explore how to leverage Cursor to get your first 100 lines of code down on paper.

Prerequisites: What You Need to Get Started

Before we jump into the tutorial, let’s cover what you need:

  1. Cursor Account: Sign up for a free account at Cursor.
  2. Basic Understanding of Programming Concepts: Familiarize yourself with basic terms like variables, loops, and functions.
  3. A Code Editor: You can use Cursor's built-in editor, but having a local editor like Visual Studio Code can be beneficial.

Time Estimate: How Long Will It Take?

You can finish this tutorial in about 2 hours if you follow along and practice as you go.

Step-by-Step Guide to Writing Your First 100 Lines of Code

Step 1: Setting Up Your Environment

  1. Open Cursor: Log in to your Cursor account.
  2. Create a New Project: Click on "New Project" and select a programming language (Python is a great choice for beginners).
  3. Familiarize Yourself with the Interface: Take a moment to explore the features available, including the AI assistant.

Step 2: Writing Your First Lines of Code

  1. Start with a Simple Program: Let's write a program that prints "Hello, World!".
    print("Hello, World!")
    
  2. Use Cursor’s AI Suggestions: As you type, Cursor will suggest completions. Accept them to see how it structures code.
  3. Modify the Program: Change the output message to something personal, like your name:
    print("Hello, [Your Name]!")
    

Step 3: Expanding Your Code

  1. Create a Simple Function: Functions are essential in coding. Let's create one that adds two numbers:
    def add_numbers(a, b):
        return a + b
    
  2. Call Your Function: Test the function by calling it:
    result = add_numbers(5, 3)
    print("The sum is:", result)
    

Step 4: Adding More Complexity

  1. Introduce Loops: Write a loop that prints numbers from 1 to 10:
    for i in range(1, 11):
        print(i)
    
  2. Combine Concepts: Now, let’s modify the loop to add numbers and print the total:
    total = 0
    for i in range(1, 11):
        total += i
    print("The total is:", total)
    

Step 5: Final Touches

  1. Comments: Add comments to your code for clarity.
    # This function adds two numbers
    def add_numbers(a, b):
        return a + b
    
  2. Review Your Code: Go through your code and make sure it runs without errors in Cursor.

Troubleshooting Common Issues

  • Error Messages: If you see an error, read it carefully; it often tells you what went wrong.
  • Cursor Suggestions: If Cursor isn’t suggesting what you expect, try rephrasing your request or looking for similar commands.

What's Next? Progression After Your First 100 Lines

Once you’ve written your first 100 lines, consider the following:

  1. Build a Small Project: Create a simple calculator or a to-do list app.
  2. Explore More Languages: Try learning JavaScript or Ruby using Cursor.
  3. Join Coding Communities: Engage with others who are starting their coding journeys.

Conclusion: Start Here

If you're a beginner looking to get started with coding, using Cursor is a practical choice. It simplifies many aspects of writing code, making it easier to learn. Follow this guide, and you'll have a solid foundation with your first 100 lines of code in no time.

What We Actually Use

In our experience, we use Cursor primarily for its AI assistance and real-time suggestions, especially when we’re stuck on syntax or logic. It’s a great tool for beginners, but as you scale, consider integrating it with other tools for more complex projects.

Follow Our Building Journey

Weekly podcast episodes on tools we're testing, products we're shipping, and lessons from building in public.

Subscribe

Never miss an episode

Subscribe to Built This Week for weekly insights on AI tools, product building, and startup lessons from Ryz Labs.

Subscribe
Ai Coding Tools

10 Mistakes New Developers Make When Using AI Tools

10 Mistakes New Developers Make When Using AI Tools As we dive into 2026, AI tools have transformed the coding landscape. But with all the excitement, new developers often stumble

Mar 16, 20264 min read
Ai Coding Tools

How to Use Cursor.ai for Rapid Prototyping in Under 60 Minutes

How to Use Cursor.ai for Rapid Prototyping in Under 60 Minutes In the fastpaced world of building side projects, getting an idea from concept to prototype can feel overwhelming. Ma

Mar 16, 20263 min read
Ai Coding Tools

Why GitHub Copilot is Overrated: Contrarian Perspectives on AI Coding Assistants

Why GitHub Copilot is Overrated: Contrarian Perspectives on AI Coding Assistants As a solo founder or indie hacker, you’re always on the lookout for tools that genuinely boost your

Mar 16, 20264 min read
Ai Coding Tools

How to Build Your First App Using AI Tools in Under 3 Hours

How to Build Your First App Using AI Tools in Under 3 Hours If you're a solo founder or an indie hacker, the thought of building an app might seem daunting. But what if I told you

Mar 16, 20265 min read
Ai Coding Tools

Top 5 AI Tools for Beginners in 2026: Your Launchpad

Top 5 AI Tools for Beginners in 2026: Your Launchpad As a beginner diving into the world of coding in 2026, the landscape is flooded with AI tools promising to make your journey sm

Mar 16, 20264 min read
Ai Coding Tools

Supabase vs Firebase for AI-Driven Projects: A 2026 Comparison

Supabase vs Firebase for AIDriven Projects: A 2026 Comparison As we dive into 2026, the landscape for building AIdriven applications has evolved significantly. If you're an indie h

Mar 16, 20264 min read