# Bubble Programming Challenge: 1 – FizzBuzz

In the world of computer programming, there are some classic, simple programming challenges that are a great way to learn how to programme simple logic, in whatever language you’re learning, as well as test your existing skills.

I thought it could be a fun and useful challenge to take some of these and try them in pure vanilla Bubble. Why not?…

These challenges are a great way to get more familiar with Bubble’s logic and functionality, as well as highlighting some of Bubble’s current limitations (which is always useful for any developer to know).

The challenge here is not so much in establishing the logic (I’m sure most people would just Google it or ask ChatGPT anyway) but rather, translating that logic into Bubble.

Some of these are very simple – some are more challenging.

The rules are simple… NO plugins and NO custom code allowed – these must be done 100% with Pure Vanilla Bubble.

(not that that’s how I’d do these things, nor recommend them be done, in a real app necessarily – but the aim here is to complete these challenges using nothing but Bubble).

So, whether you’re just starting out learning Bubble, and want to get more familiar with how Bubble works, or you’re a more experienced user who wants to test your Bubble knowledge and skills, I’d highly recommend trying some of these for yourself… most of them don’t take very long to complete and you’ll definitely gain some insights into doing certain things in Bubble by doing them.

Most, if not all of these challenges will have multiple ways to solve them…

Feel free to share your working examples right here in this thread… but lets hold off sharing any solutions publicly until people have had a chance to try it for themselves. (or if you like, you can DM me a link to your solution…)

If you get stuck feel free to ask for help (I’m sure someone will help you).

It will be good to see how many ways there are to solve each one.

Right… let’s start with an easy one (and a classic one)…

The Fizz Buzz Challenge

The Fizz Buzz challenge is simple…

All you have to do is print a list of numbers from 1-n (where n is a variable input by the user), but replace every multiple of 3 with the word “Fizz”, every multiple of 5 with the word “Buzz” and every multiple of both 3 and 5 with the word “FizzBuzz”

As I said, this one is a simple one, so I’ll share some more difficult ones at a future time.

Remember… No plugins and No custom code (all of these can be done in pure vanilla Bubble, even if it means finding some creative ways to do so).

17 Likes

Here’s an example…

The Fizz-Buzz Challenge (bubbleapps.io)

Fizz buzz. My first interview question back in 2008 fabulous idea.

1 Like

Cool idea, @adamhholmes. Would you prefer that only newer Bubblers participate, and if not, do you want experienced folks to at least wait a bit before posting a solution?

2 Likes

We can share the demo page (not editor) then later show the editor

1 Like

I’m a screenshot guy, so here is my example in action. It works… trust me.

3 Likes

Do you swear you didn’t typed?

2 Likes

Not at all… these are great for anyone to do (I personally found them very useful - even the simpler ones)… so feel free to get involved

Good call…

2 Likes

Cool. I’ve got a solution to post whenever you want 'em… although, I have a feeling mine is very similar to, if not exactly the same as, yours. Oh, and @rpetribu, I’m way too lazy to have typed that out!

1 Like

@mikeloc let’s see if anyone else wants to get involved first before we start revealing solutions

1 Like

Press enter after inputting number.

3 Likes

Nice… bonus points for the colours

2 Likes

Wait to give those bonus points until you see the editor. You’ll be like “wtf?? and it didn’t blow up?”

I might have to take them back… although there could be more bonus points for the most complicated solution as well as the simplest

I DMd you the editor. I think it’s actually a simple approach

1 Like

Got it… nice solution… same basic approach as me, just implemented in a different way… I like it.

Let’s see what anyone else can come up with.

1 Like

Bump

Come play!

1 Like

Even with a simple task like this there are multiple ways to achieve the end result in Bubble…

There are (at least) two main approaches to this challenge…

The first way (and this was my initial approach) is to generate a list of numbers (and without using any plugins, that’s not as simple a thing to do in Bubble as it should be, but I’ve already seen a few different solutions from people for that within the confines of Bubble’s current capabilities) - and then format that list accordingly to show the correct word based on the number - and again, there are (at least) 2 different ways to do that in Bubble…

The other way is just to generate a list of texts directly (or a single text) already formatted to show the correct word… which on paper seems like a slightly more efficient method, but in practice it’s only 1 less expression, so there’s really nothing between the two methods…

If anyone else has any alternative methods it would be interesting to see them, so feel free to DM me your solutions… (@mikeloc feel free to DM me yours, so I can see what you came up with for this…)

2 Likes

Done Sur

1 Like

Nice work… feel free to DM me your solution as well…