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

How to Use Cursor to Build Your First App in 4 Hours

How to Use Cursor to Build Your First App in 4 Hours If you’re like me—a solo founder or indie hacker—you know how daunting the prospect of building your first app can be. The endl

May 8, 20264 min read
Ai Coding Tools

How to Build a Basic App with AI Coding Tools in Just 2 Hours

How to Build a Basic App with AI Coding Tools in Just 2 Hours Building an app can feel like a monumental task, especially if you’re an indie hacker or a solo founder with limited c

May 8, 20264 min read
Ai Coding Tools

5 Costly Mistakes You Make When Using AI Coding Tools

5 Costly Mistakes You Make When Using AI Coding Tools In 2026, AI coding tools have become essential for indie hackers, solo founders, and side project builders. They promise to sa

May 8, 20264 min read
Ai Coding Tools

Why Low-Code AI Tools Are Overrated: A Critical Examination

Why LowCode AI Tools Are Overrated: A Critical Examination In 2026, lowcode AI tools are everywhere. They promise to democratize AI development and make it accessible for indie hac

May 8, 20264 min read
Ai Coding Tools

Top 5 AI Coding Assistants for Beginners in 2026

Top 5 AI Coding Assistants for Beginners in 2026 If you're a beginner diving into coding, you might feel overwhelmed by the sheer amount of information and tools available. Enter A

May 8, 20264 min read
Ai Coding Tools

Why Most AI Coding Tools Fail New Developers

Why Most AI Coding Tools Fail New Developers (2026) As a new developer, diving into the world of coding can feel overwhelming. With an abundance of AI coding tools promising to mak

May 8, 20264 min read