Quiz App - Fun With Flags


#1

Introduction:

The Fun with Flags sample app is designed to give us a basic introduction to functions, parallel lists, string matching, APIs and incrementers in Thunkable X.

Design

The UI consists of:

  • A row for the scoreboard at the top of the screen
  • A column in the middle of the page for the quiz question
  • A row at the bottom of the screen for user input

Creating Lists

In this app we will need four variables:

  • listOfCountries
  • listOfFlags
  • currentScore
  • randomIndex

When Screen1 starts we’ll add data to our lists like this:

The purple showRandomFlag function is described in the next section:

APIs & Functions

One of the easiest APIs that you can use is provided by countryflags.io. You simply tell it the country code, size and style of flag that you want and it returns a .png image that you can use in your app.

Incrementers & Functions

If the user gets an answer correct we can update the currentScore variable by one point and then display the value to them like this:

31

String Matching

With everything else completed it’s now very easy to check how well the user knows their country flags.

Remix

Don’t see your country flag here? Want to add in some extra features? Then please remix this app, I’d love to see how you expand on this basic design.


#2

I think I’m not the unique fan from TBBT here :sweat_smile:


#3

Nice work…we need tutorial about new thunkable X components …thanks a lot!
It’s a good present for beginner like me. :wave::wave:


#4

Glad to hear you like it @Goldking. If there’s a specific component you’d like to see a tutorial on the let me know as we’ll be working on these now for the next few weeks.


#5

than you , but for now my big problem is short time :rofl: can you make a tutorial to extend day time?:stuck_out_tongue_closed_eyes: :sweat_smile: i’m very curious to start using thunkable X …
:wave::wave: have a nice day


#6

I will be thankful if you make a simple multiple quiz app with three choices.
I need to figure out the blocks of lists in multiple choice quiz app.
My regards!
_


#7

Believe it or not @Hayder_Ghazi it’s on my To-do list, thanks for the suggestion though!