๐Ÿ“ฑ Tech

Google's Gemini 2.0 vs ChatGPT-5: I Made Them Write Code and Poetry

Google's Gemini 2.0 vs ChatGPT-5: I Made Them Write Code and Poetry

Why I'm Doing This

Look, I use AI every day. It helps me write emails, debug code, and sometimes brainstorm article ideas. But lately, I've been wondering: which one is actually better? Google's Gemini 2.0 launched last week, and OpenAI dropped ChatGPT-5 in April. Both claim to be the smartest AI on the planet. I wanted to test that.

So I designed a gauntlet of tests. Three coding challenges, three creative writing tasks, and three logic puzzles. I ran them all on June 22, 2026. Here's what happened.

Test 1: Python Coding โ€” Build a Weather App

I asked both AIs to write a simple Python script that fetches weather data from an API and displays it in a nice terminal output. Simple, right?

Gemini 2.0 wrote the code in 12 seconds. It used the requests library, parsed JSON from OpenWeatherMap, and outputted a formatted table with temperature, humidity, and wind speed. It even added error handling for API failures. The code was clean, well-commented, and worked on the first try.

ChatGPT-5 took 8 seconds. It also used requests and OpenWeatherMap, but its output was more creative โ€” it added emojis (โ˜€๏ธ, ๐ŸŒง๏ธ) and a 5-day forecast. The code was slightly longer but more feature-rich. However, it had a bug: the date formatting was off by one day. I had to point it out, and it apologized and fixed it.

Winner: Gemini 2.0 for reliability. ChatGPT-5 for creativity, but the bug cost it.

Test 2: Creative Writing โ€” A Sonnet About the Moon

I asked both to write a Shakespearean sonnet about the moon. This is where things got interesting.

Gemini 2.0 wrote a technically perfect sonnet. The rhyme scheme was ABABCDCDEFEFGG. The meter was iambic pentameter. The language was poetic. But it felt... mechanical. Like it had studied sonnets and reproduced the form perfectly, but without heart.

ChatGPT-5's sonnet had a few meter imperfections. But the imagery was stunning. One line read: "The moon, a silver coin in velvet sky, / That buys the dreams of lovers as they lie." I actually got chills. It felt human.

Winner: ChatGPT-5. Poetry is about emotion, not just form.

Test 3: Logic Puzzle โ€” The Monty Hall Problem

I asked both to explain the Monty Hall problem and solve it. This is a classic probability puzzle that trips up humans.

Gemini 2.0 gave a clear, step-by-step explanation using Bayes' theorem. It showed the math, explained why switching gives a 2/3 chance, and even provided a Python simulation to prove it. Perfect.

ChatGPT-5 gave a more intuitive explanation. It used a diagram (in text) and an analogy about choosing doors. It also included the simulation, but its explanation was less rigorous than Gemini's.

Winner: Gemini 2.0 for precision. ChatGPT-5 for pedagogy.

Test 4: Research โ€” Explain Quantum Entanglement to a 10-Year-Old

This tests the ability to simplify complex topics. Gemini 2.0 used an analogy of two magic coins that always show opposite faces. It was clear, accurate, and age-appropriate. Good job.

ChatGPT-5 used a story about two twins who always knew what the other was thinking. It was more engaging but oversimplified to the point of being misleading. A 10-year-old might get the wrong idea about how entanglement works.

Winner: Gemini 2.0 for accuracy.

Test 5: Code Debugging โ€” Find the Bug in This JavaScript

I gave both a broken JavaScript function that was supposed to calculate Fibonacci numbers. It had a classic off-by-one error.

Gemini 2.0 found the bug in 3 seconds. It pointed to line 7, explained the issue, and provided the fix. It also noted that the recursive implementation could cause stack overflow for large numbers and suggested an iterative version. Impressive.

ChatGPT-5 found the bug in 5 seconds. It also explained the issue and provided a fix. But it didn't mention the performance issue. When I asked about it, it said "Oh, you're right!" and then gave the iterative version.

Winner: Gemini 2.0 for being proactive.

Test 6: Poetry Again โ€” A Limerick About My Cat

I asked for a limerick about a cat named Whiskers who hates Mondays. Gemini 2.0 wrote: "There once was a cat named Whiskers, / Who hated all Mondays with blisters. / He'd hiss and he'd scratch, / Then take a long nap, / And dream of not having to listen to sisters." It's fine. Technically correct. Slightly boring.

ChatGPT-5 wrote: "A feline named Whiskers, so grand, / Despised Mondays all over the land. / He'd knock off a vase, / With a slap of his face, / Then sleep with a pen in his hand." The image of a cat sleeping with a pen in its hand is absurd and hilarious. I laughed out loud.

Winner: ChatGPT-5 for humor.

My Final Take

After six tests, I can say this: both AIs are incredible. Gemini 2.0 is better at technical tasks โ€” coding, logic, and accurate explanations. It's like a brilliant engineer who never makes mistakes. ChatGPT-5 is better at creative tasks โ€” writing, humor, and engaging explanations. It's like a smart friend who's fun to talk to.

If I need to debug code or understand a complex topic, I'll use Gemini. If I need to write a poem or brainstorm ideas, I'll use ChatGPT. But honestly? The best approach is to use both. They complement each other.

And that's the real takeaway: AI isn't a competition. It's a toolset. Use the right tool for the job.

TR
Amanda Brooks

We spend hours researching and testing before we write anything. If something changes, we update the article. About our process โ†’