"把一塊石頭以45度角向上拋。當石塊到達最高點時,以下哪一項描述是正確的?", "Ans" => "D", "cho" => array( "A" => "石塊的加速度為零", "B" => "石塊的加速度最小,但不等於零", "C" => "總能量達到最大值", "D" => "動能最小" ) ), array( "Ques" => "現今的食用大米一般屬於以下哪一類的品種?", "Ans" => "C", "cho" => array( "A" => "基因改造品種 (genetically modified species)", "B" => "天然野生品種", "C" => "雜交種 (hybrid species)", "D" => "以上三者都不是" ) ), array( "Ques" => "紅潮毒素一般經什麼途徑進入人體內?", "Ans" => "B", "cho" => array( "A" => "飲用被紅潮污染的食水", "B" => "進食被紅潮污染的貝類", "C" => "在被紅潮污染的水中游泳", "D" => "A 和 B" ) ), array( "Ques" => "電解稀硫酸時,在陽極(anode)會釋放哪種氣體?", "Ans" => "A", "cho" => array( "A" => "氧氣", "B" => "二氣化硫", "C" => "氫氣", "D" => "水蒸汽") ), array( "Ques" => "在氮循環過程中,以下哪一項不屬於把大氣中的氮固定的其中一種因素?", "Ans" => "D", "cho" => array( "A" => "工業合成肥料", "B" => "閃電", "C" => "與豆科植物共生的根瘤菌(Rhizobium)", "D" => "去氮作用(denitrification)") ), ); if ($_GET["lnk"] != "result") { $subquiz = explode("_", $_GET["lnk"]); $subquiz = $subquiz[1]; if (empty($subquiz)) { $choice = 0; } else { $choice = $subquiz - 1; } } if (empty($_GET["an"])) { if ($_GET["lnk"] != "result") { $qz = $Quiz[$choice]; $content = "
" . $qz["Ques"] . "

"; $content .= "
    \n"; if (count($qz["cho"]) > 0) { foreach ($qz["cho"] as $key => $value) { $content .= "
  1. " . $value . "
  2. \n"; } } $content .= "
\n"; } else { if (count($_SESSION["quiz_m"]) > 0) { $total = 0; foreach($_SESSION["quiz_m"] as $key => $value) { if ($value == 1) { $total++; } } } $content = "
You have " . $total . " Correct Answer(s).



"; // $content .= "Result"; $content .= "Play again?"; $_SESSION["quiz_s"] = ""; $_SESSION["quiz_m"] = ""; } } else { $qz = $Quiz[$choice]; $content = "
" . $qz["Ques"] . "

"; $content .= "
    \n"; if (count($qz["cho"]) > 0) { foreach ($qz["cho"] as $key => $value) { if ($key == $_GET["an"]) { $content .= "
  1. " . $value . ""; if ($_GET["an"] == $qz["Ans"]) { $message = "Correct!"; $_SESSION["quiz_m"][$choice] = 1; $content .= " "; } else { $_SESSION["quiz_m"][$choice] = 0; $message = "You are wrong!
    The answer is " . $qz["Ans"] . ""; $content .= " "; } $content .= "
  2. \n"; } else { $content .= "
  3. " . $value . "
  4. \n"; } } } $content .= "
\n"; $content .= "" . $message . "

\n"; if ($subquiz < 5) { // $content .= "Next"; $content .= "Next Question"; } else { // $content .= "Result"; $content .= "The Result is..."; } } $mainContent = "
\n"; // $mainContent .= "
Simulated Science Quiz

\n"; if ($_GET["lnk"] != "result") { switch ($choice) { case 0 : $alttxt = "Question 1"; break; case 1 : $alttxt = "Question 2"; break; case 2 : $alttxt = "Question 3"; break; case 3 : $alttxt = "Question 4"; break; case 4 : $alttxt = "Question 5"; break; } $mainContent .= "
Quiz will be conducted in Cantonese with English translation provided for some scientific terms when necessary.

" . $alttxt . "
\n"; } $mainContent .= "
" . $content . "
\n"; $mainContent .= "
"; require_once("e_common_html.php"); exit; ?>