Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Learning Aids/Tools 2 years ago
Posted on 16 Aug 2022, this text provides information on Learning Aids/Tools related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
Problem:
I'm trying to code a multiple choice quiz for my fellow students -and primarily to aid my own learning- and so I'm creating a multiple choice web-based quiz using PHP (5.2.08) and MySQL (5.0.32)
The questions table is:
+----------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+-----+---------+----------------+ | id | int(6) | NO | PRI | NULL | auto_increment | | question | varchar(200) | NO | | NULL | | | correct | varchar(80) | NO | | NULL | | | wrong1 | varchar(80) | NO | | NULL | | | wrong2 | varchar(80) | NO | | NULL | | | wrong3 | varchar(80) | NO | | NULL | | +----------+--------------+------+-----+---------+----------------+
Sample print_r($questions) output for one question:
Array ( [0] => Array ( [id] => 1 [question] => What is the correct pipeline pressure for Nitrous Oxide (<abbr title="Nitrous Oxide.">N<span class="chem-notation">2</span>Oabbr>)? [answers] => Array ( [0] => Array ( [correct] => 1 [answer] => 60<abbr title="Pounds per square inch">PSIabbr>. ) [1] => Array ( [correct] => 0 [answer] => 45<abbr title="Pounds per square inch">PSIabbr>. ) [2] => Array ( [correct] => 0 [answer] => 30<abbr title="Pounds per square inch">PSI REPLY 0 views 0 likes 0 shares Facebook Twitter Linked In WhatsApp
Your data tables are awful. You need one table for questions">questions and another table for answers. Each entry in the answers table refers back to a question in the questions">questions table and has a flag indicating whether it is the correct answer.
So, the QUESTIONS table has the following fields:
QUESTIONS
QUESTION_TYPE
The ANSWERS table has the following fields:
ANSWERS
ANSWER_ID
ANSWER_TEXT
IS_CORRECT
Makes your life infinitely easier and obviates the raison d'etre for this question.
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 10 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 9 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.