How do you make a quiz in one screen?

If you want checkbox to work as radio button you can achive by allowing olny one checkbox to be checked, as

i don't understand

Checked boxes are for MSQs type questions and radio buttons are for MCQs type questions, as you want to activate NEXT button to be activated on a checkbox get selected, then I suggested to use checkbox to behave like radio button. That's what you need to work around.


how to found "call wrongAnswer"

hi, please help me for create checkbox quiz
esample of my quiz
Screen1
Start(open Screen2)
In screen2 there are four categories
Category1
Category2
Category3
Category4
Category1 open screen3, but after how do I make sure there is the second question

This example does not answer your exact question but the code might give you some ideas for a checkbox based quiz.

quiz2

MyQuiz2.aia (7.2 KB)
quizQuestions2.txt (276 Bytes)

1 Like

how to active "next question" when i click correct answer

I don't want to use a question and answer file

Then don't. Hard code the questions and answers. What you do is up to you. The code snippets provided work with a question csv file which indicates the 'answer' as an item number. The csv could be (awkwardly) included in the code Blocks without using the File component.

Because a vertical layout is used, this model can be replicated for as many 'categories' (whatever that means) and shown/hidden by using additional vertical layouts (one for each category perhaps.

What do you want to do and why can't you use the example as it is? I and others would like to help but it appears impossible.

i write question and answer in lists blocks, but how change ques. and ans.?

Is it true that checkbox quiz cannot be created with lists?

how to use this for checkbox quiz?

1, in second list, the 'make a list' block not needed.
2, hard coded q an a is only for testing, a csv file or get q/a from Internet is better.
3. have you checked the sample from SteveJG? if yes, you will got the answers to your questions.

No. The quiz can work with a List See the equivalent of the csv file as a List here


You can modify the QuizQuestion2.txt file with your additional questions/answers
and load the modified file to Media (Assets)

Example:

Who was the first President?, Washington, Jefferson, Lincoln, Hamilton,2
The law of the land, First Amendment,Constitution, Articles of Confederation, Bill of Rights,3
Where is MIT?,Germany,Texas,none of these,Boston,5
What is the opposite of happy?, euphoric,sad,ok,fine,3

Who is the most recent President?, Washington, Trump, Biden, Lincoln,3
the question | the four comma separated possible answers (the second through fourth items) | the correct answer (4 - the fourth item counting the question item (Biden).

and keep using this construction to make your Question file. You can use Notepad to make the csv.

You only need one List where that is a List of Lists as one way to use a List. If you do it this way modify the app logic. You can also use two separate Lists, but then you have to recode everything. :cry:

I think it is easier to use a csv. The code is already provided. Why do you need to do this with a List? You can create a List from the csv (see above).

The example can automatically go to the next question when a user clicks the correct answer if you use an if.then.else statement to run the code that is in Button1.

See Kevinkun's advice. :slight_smile:

1 Like

in the sample from SteveJG, he use the file txt, i don't want to use file txt

what about adjusting the example to your needs?

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles
How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .

Also do the tutorials Our Tutorials! to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

How to use two separate Lists and how i recode everything.
i dont use file.txt because i write too many questions and answers and i dont want write a lot of in a text file

You don't have to.

Write 'a lot' in a spreadsheet and export the questions/answers as a csv?

. Learn to use the tools that help you format information on your PC. This is easy. What you want to do is awkward and still requires you type the questions and answers.

Wait long enough and someone might code that for you or you will try some things and do the coding yourself. :slight_smile: Be sure and share your results. Thank you.

sorry but i understand my error and I badly explained myself, i dont use csv list, i use normal lists


this is correct? for question i delete the 2 "make a list" ?