HELP: Quiz with 3 possible answers using a csv document

you can open the csv file with any text editor, like notepad++

you can remove all lines, except line one, then check if it working or not. Then add line 2, then check. ....

Can you screen shot the exact Excel pulldown option you used for the export?

There are a lot of options to get right in the export.

Sure, but i've extracted it from Google Sheets. I've exported it from the csv option.

The data itself and the transfer to Google Sheets from Excel have created a malformed csv file, as previously indicated by @Kevinkun .

I suggest you generate a new google sheet and ENTER the data there (do not copy and paste), then check the conformity of the data downloaded to your csv file.

Ok, but how do I know if the new csv is okay? Should my App work?

Check it in a text editor

Given that your data is in a Google Sheet, that opens up more possible ways to download it into a table:

Hi, I've corrected the csv file but now the app says that I attempt to get item number 1 of a list of length 0. Also, when the screen inizializes it says that the file couldn't be found.

Do you know how I can fix it?

Please provide your "corrected" csv file for testing (or your aia project)

test it

qUIZ.aia (6.5 KB)

(Sorry if i understand you wrong)

No issues with the list loading here. However,

You need to remove the 1st item in the list AllData because this contains the header row

Selecting a correct answer returns "Wrong"

Test finishes at last question, but needs to present a score for the user

1 Like

I guess, but the problem (due to langusge issue) i blindly believe that 6th item is answer but it no where related to answer so it gives wrong for all click

If the OP clears all may be he can further add.. adding score is simple thing that user itself can fix it. The problem for me is, users csv 5th col was empty so did like this

Hey I've tried it and I think that I can fix the problem with the "wrong", just adding punctuation.

Thank you for helping me by the way :slight_smile:

1 Like

hey, I've been trying to program my history quiz and it doesn't work properly. The "error" is: "Select list item: Attempt to get item number 3 of a list of length 2: [[], 1"

Do you know what I can do to fix it? I don't understand why the list's lengh is 2.

blocks (15)

blocks (13)
blocks (12)
blocks (11)

blocks (19)

Probably this list:

which makes a list length of 2

and how do I do it to fix it, do I add more random things to it?

This appears to be how you code your blocks, so I do not recommend that approach :wink:

Work your way through your process, testing at each stage/change, you will find a way....

Instead of make a list block just try with select list item list (please make a change in where @TIMAI2 have pointed out)

Here is alternative way to use a csv to provide a quiz with selections in random order:

There are two variations of the example app. Explanations of use of the code are scattered throughout the discussion.

How do you make a quiz in one screen? - #23 by SteveJG and a second example How do you make a quiz in one screen? - #54 by SteveJG