Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.

# Thread: How to create quiz with 2 conditions?

1. ## How to create quiz with 2 conditions?

I have idea to making quiz. It was succeed when I create with Ms. Excell.
Now I want to create with JavaScript.
Can anyone help me with this conditions:

Quiz Example:

Question:
What is this number 777?

A. 993
B. 344
C. 777
D. 987

1. YES
2. No

So, the student will answer with 2 conditions:

This is the conditios:

When the answer is right in conditions 1 and YES in condition 2, the score is 100.

When the answer is right in conditions 1 and NO in condition 2, the score is 100.

When the answer is false in condition 1, the score is 0.

The answer sheet must be like this:
• Right answer : xx (with number)
• False answer : xx (with number)
• Right answer and YES : xx % (with pencentage)
• Right answer and NO : xx % (with pencentage)

The conditions for percentage is:

right answer and YES / total YES

right answer and NO / total NO

• This forum is not a free coding service. As a general rule, the people helping out in this forum don't write code for others (especially code that appears to be for homework), but try to help with fixing code that doesn't work. You may perhaps get someone to write this script for you, but you'll be far more likely to get help if you have made a substantial effort and written some code yourself. Then someone here will almost certainly help you correct/improve your work.

It is your responsibility to die() if necessary….. - PHP Manual

• ## Users who have thanked Philip M for this post:

bonyhardian (05-23-2013)

I'm new in this forum.

So, where I can get resolve with my idea?

Originally Posted by Philip M
This forum is not a free coding service. As a general rule, the people helping out in this forum don't write code for others (especially code that appears to be for homework), but try to help with fixing code that doesn't work. You may perhaps get someone to write this script for you, but you'll be far more likely to get help if you have made a substantial effort and written some code yourself. Then someone here will almost certainly help you correct/improve your work.

It is your responsibility to die() if necessary….. - PHP Manual

If I may say so, your "quiz" sounds pretty silly:-

When the answer is right in conditions 1 and YES in condition 2, the score is 100.
When the answer is right in conditions 1 and NO in condition 2, the score is 100.

So what is the point of "condition 2"?

• And, by the way, Philip is doing the right thing by not giving you the answers.

Look here:
http://www.codingforums.com/rules.htm
and look especially at rule 1.5

•

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•