Coding help school project (really needed)

Hello, so I was working on my school project again, and I encountered an error on line 121
the link:

please tell me what to do (its list index out of range)

Hi Bart, and welcome!

If you are getting a list index that is out of range, you need to think
about your code and work out why the index is out of range.

I’m going to try analysing your code. You have:

aantal_vragen = len(vragen)
gekozen_getal = random.randint(0,aantal_vragen-1)
gekozen_vraag = vragen[gekozen_getal]
gekozen_antwoord = antwoorden[gekozen_getal]
gekozen_thema = themas[gekozen_getal]

and vragen is a list of 20 questions. Then you generate a random
number between 0 and 19 (gekozen_getal). You look up that question
using vragen[gekozen_getal], then you get the answer using

But then you try to get a theme using themas[gekozen_getal], but there
are only four themes. So if your random number is 5 or more, your index
is out of range and you get an error.

Hi there,
Thanks for your fast reply!
So if I’m right, I have to have a total of 20 themes,

kind regards,
anymous coder

I did it now, thanks for your helpful help :grinning: