I let ChatGPT code an app – Here’s what happened

AI Chatbots like ChatGPT can write code for us, so I let ChatGPT code a calculator app - and here's what happened.

I let ChatGPT code an app

You can trust PC GuideOur team of experts use a combination of independent consumer research, in-depth testing where appropriate – which will be flagged as such, and market analysis when recommending products, software and services. Find out how we test here.

Last Updated on

One of the most novel and interesting abilities of an AI is programming. The AI itself is, after all, nothing more than code. This does logically lead to the conclusion that AI can create AI, ad infinitum. We’ll explore that another time. For now, let’s make a calculator app (or let ChatGPT code it, as the case definitely is).

I let ChatGPT code an app

I’ll be honest with you here. I’ve never made an app before in my life. This article, and the proceeding series of articles, which follow my journey of creating progressively more complicated apps, will serve as a publicly humiliating record of starting from ground zero.

Essential AI Tools

Editor’s pick
Only $0.00019 per word!

Content Guardian – AI Content Checker – One-click, Eight Checks

8 Market leading AI Content Checkers in ONE click. The only 8-in-1 AI content detector platform in the world. We integrate with leading AI content detectors to give unparalleled confidence that your content appear to be written by a human.
EXCLUSIVE DEAL 10,000 free bonus credits

Jasper AI

On-brand AI content wherever you create. 100,000+ customers creating real content with Jasper. One AI tool, all the best models.
TRY FOR FREE

WordAI

10x Your Content Output With AI. Key features – No duplicate content, full control, in built AI content checker. Free trial available.
TRY FOR FREE

Copy.ai

Experience the full power of an AI content generator that delivers premium results in seconds. 8 million users enjoy writing blogs 10x faster, effortlessly creating higher converting social media posts or writing more engaging emails. Sign up for a free trial.
TRY FOR FREE

Writesonic

Create SEO-optimized and plagiarism-free content for your blogs, ads, emails, and website 10X faster. Start for free. No credit card required.

With that said, I don’t need to know how. You don’t need to know how either. Even if you know nothing about mobile app development, writing code, and you can barely follow instructions, you too can make an app. It’s basically the new ‘podcast’. Follow along, and let’s make our first apps together, using AI. Try “What is ChatGPT – and what is it used for?” or “How to use ChatGPT on mobile” for further reading on ChatGPT.

Thankfully for us, ChatGPT knows how to read and write Python code. Actually, it knows a lot of programming languages; Java, Javascript, HTML, PHP, CSS, SQL, Ruby and more. However, a lot of the AI industry is built on Python – including ChatGPT itself. Let’s start there.

How to use ChatGPT to code a calculator app

My first prompt in this process was very straightforward.

“Code a calculator app in Python”

Code a calculator app in Python
Code a calculator app in Python

I don’t know what I was expecting… but it did it.

The app itself is not complex by a professional engineers standards. The more complex you go, the more likely bugs are to creep in, but that goes for humans too. All I need was a quickly verifiable-as-functional piece of software to prove my point. That, with nothing more than a 6-word user input, Chat GPT was able to circumvent my lack of data science education entirely.

In addition to doing what I had asked of it, it then told me what to do next. Following the code itself, delineated by a visually distinct box, the addendum reads “Copy and paste this code into a Python interpreter or a .py file and run it. It will display a simple command-line interface for the calculator app where you can perform basic arithmetic operations. To exit the calculator, just type ‘q’ when prompted for the operator.”

Python compiler addendum
Python compiler addendum

It told me what I didn’t know I didn’t know. That, is the truly astounding difference between an AI chatbot and traditional search. Off I went to find this “Python interpreter”. I will admit, for this task, I used Google.

Having found an online compiler that required no downloading, I copy & pasted in ‘my’ first ever code. I hit the “Run” button. It ran.

The calculator app
The calculator app

This simple sum, “5*3=15”, is currently my magnum opus as a computer programmer. Having skipped print “Hello world” and ascended immediately to genius level, I retired there and went back to programming words instead.

Conclusion

My AI chatbot here is merely GPT-3.5. Upgrading to ChatGPT Plus, I would access to GPT-4 and the host of improvements that comes with. Any modern LLM (Large Language Model) is capable of similar magic, and though they may differ in how they write the same piece of code,the capabilities are largely the same. Each of our favourite natural language processing platforms is also a programming powerhouse, and this use case should be incredibly exciting to anyone who has access to it – and that person is you.

Steve is the AI Content Writer for PC Guide, writing about all things artificial intelligence. He currently leads the AI reviews on the website.