'I', 'You', 'He/she/it', 'We', 'You', 'They'); $be = array(1 => 'am', 'are', 'is', 'are', 'are', 'are'); $words = explode(' ', $verb); // if there is a preposition after the verb $question = $persons[$person].' '; if ($negative) { if ($words[0]=='be') { $question .= $be[$person] . " not"; } else { if ($person==3) $question .= "does not $words[0]"; else $question .= "do not $words[0]"; } } else { if ($words[0]=='be') { $question .= $be[$person]; } else { if ($person==3) $question .= eng3sgVerb($words[0]); else $question .= $words[0]; } } for ($i=1; $i321 AND e2.style=0".($id?" AND e1.id=$id":" ORDER BY RAND()").";"); else $r = mysql_query("SELECT * FROM pvc_verbs WHERE id<>26 AND isnew=0 AND level=1 AND style=0 AND translation IS NOT NULL".($id?" AND id=$id":" ORDER BY RAND()").";"); $row = mysql_fetch_assoc($r); if ($row===false) exit("The verb is not found"); $verb_id = $row['id']; if ($isPersScript) { $randomVerb = $row['pers_inf']; $presStem = $row['pers_presstem']; } else { $randomVerb = $row['trans_inf']; $presStem = $row['trans_presstem']; } $presStemTrans = $row['trans_presstem']; $engVerb = $row['translation']; $engVerbs = explode(',', $engVerb); $engVerb = $engVerbs[0]; if (substr($engVerb, 0, 3)=='to ') $engVerb = substr($engVerb, 3); // $engVerb = trim($engVerbs[array_rand($engVerbs)]); // Select one verb if there are synonyms //Make a list of answers - person numbers $persons = range(1, 6); shuffle($persons); // 1 - correct; 2 - wrong person; 3 - wrong tense, 4 - wrong tense and person $qtypes = array(1,2,3,4); shuffle($qtypes); $answer = array_search(1, $qtypes); $persons[array_search(3, $qtypes)] = $persons[$answer]; if ($isSpoken) $wrong_tenses = array(1, 2, 5, 6); else $wrong_tenses = array(1, 2, 4, 5, 6, 8, 10); if ($presStemTrans!="dār") $wrong_tenses[] = 3; shuffle($wrong_tenses); $neg = array(0, 0, 0, 1, 1, 1); shuffle($neg); $tenses = array(); for ($j=0; $j<4; $j++) { switch ($qtypes[$j]) { case 1: // correct answer case 2: // wrong person if ($presStemTrans=="dār") $tenses[] = 3; else $tenses[] = 9; break; default: do { $tense = array_shift($wrong_tenses); } while (Conjugate(substr($randomVerb, 0, strlen($randomVerb)-2), $presStem, $presStemTrans, $tense, $persons[$j])==""); $tenses[] = $tense; // It is not wrong to have the perfect subjunctive. // It may be rare, but it is possible. // Make them wrongly positive or negative if ($tense==3 && $neg[$j]==$neg[$answer]) { $neg[$j] = abs($neg[$answer]-1); } break; } // only one YOU should be among answers if ($qtypes[$j]==2) { if ($persons[$answer]==2 && $persons[$j]==5) { $persons[$j] = array_pop($persons); } if ($persons[$answer]==5 && $persons[$j]==2) { $persons[$j] = array_pop($persons); } } } $modal = rand(0, 1); $data = "$verb_id:$engVerb:$modal:$answer:".implode(",", $persons).":".implode(",", $tenses).":".implode(",", $qtypes).":".implode(",", $neg); $data = base64_encode($data); } $pastStem = substr($randomVerb, 0, strlen($randomVerb)-2); if ($isPersScript) { if ($isSpoken) $modal_verbs = array(array("خواست", "خوا", "khā", "want"), array("تونست", "تون", "tun", "be able")); else $modal_verbs = array(array("خواست", "خواه", "khāh", "want"), array("توانست", "توان", "tavān", "be able")); } else { if ($isSpoken) $modal_verbs = array(array("khāst", "khā", "khā", "want"), array("tunest", "tun", "tun", "be able")); else $modal_verbs = array(array("khāst", "khāh", "khāh", "want"), array("tavānest", "tavān", "tavān", "be able")); } ?> .css"> \n

$title

\n"; print "



You have answered the question correctly.


Try another question.


Back to the Persian Verb Conjugator
\n"; if ($id) print "Basic Verb Conjugation Tests
"; exit("Back to the Persian Tests

"); } print "\n"; } else { print "\n"; } ?>

Please translate to Persian:

".GetQuestion($persons[$answer], $neg[$answer], $modal_verbs[$modal][3])." to $engVerb."; print "

".Conjugate($modal_verbs[$modal][0], $modal_verbs[$modal][1], $modal_verbs[$modal][2], ($neg[$answer]==1?17:7), $persons[$answer])." ..."; print ""; print ""; print ""; print "
".Conjugate($pastStem, $presStem, $presStemTrans, $tenses[0], $persons[0])."
".Conjugate($pastStem, $presStem, $presStemTrans, $tenses[1], $persons[1])."
".Conjugate($pastStem, $presStem, $presStemTrans, $tenses[2], $persons[2])."
".Conjugate($pastStem, $presStem, $presStemTrans, $tenses[3], $persons[3])."
"; } print "

"; ?>

Back to the Persian Verb Conjugator Basic Verb Conjugation Tests"; ?>

Back to the Persian Tests