Foundationdefault_logicEasy function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS= Feedback%QUESTION.NUMBER%; SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 10, 20 , 0); a = myAArray; myMArray = displayarray( 1, 45, 60, 0); m = myMArray; myPArray = displayarray( 1, 45, 60, 0); p = myPArray; c = 100-a; t = m+p; QuestionText%QUESTION.NUMBER% = "

There are 100 students at level 1 at "+the_university()+". "+m+" plan to study Mathematics, "+p+" plan to study Programming. How many plan to study both Mathematics and Programming, given that "+a+" students will not study either subject?

" Correct%QUESTION.NUMBER% = m+p-(100-a); //document.write(Correct%QUESTION.NUMBER%); Feedback%QUESTION.NUMBER%="

There are 100 students in the group but "+a+" of them will not study any of the 2 subjects. Therefore, "+c+" will study at least one subject.
"+m+" plan to study Mathematics and "+p+" Programming. There would have to be "+t+" students in the group taking at least one subject in order to let them study only one subject each. Hence, "+Correct%QUESTION.NUMBER%+" (="+t+"-"+c+") plan to study both Mathematics and Programming.

"; Feedback%QUESTION.NUMBER%+=counting_formula("M","P"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logicEasy function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS= Feedback%QUESTION.NUMBER%; SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myMArray = displayarray( 1, 50, 70 , 0); m = myMArray; myPArray = displayarray( 1, 50, 70 , 0); p = myPArray; t = m+p; QuestionText%QUESTION.NUMBER% = "

A group of 100 students plan to study Mathematics and/or Programming as part of their course. "+m+" plan to study Mathematics, "+p+" plan to study Programming. How many plan to study both Mathematics and Programming, given that each student must study at least one of the 2 subjects?

" Correct%QUESTION.NUMBER% = (m+p)-100; //document.write(Correct%QUESTION.NUMBER%); Feedback%QUESTION.NUMBER%="

There are 100 students in the group and each of them must study at least one of the 2 subjects. "+m+" plan to study Mathematics and "+p+" Programming. There would have to be "+t+" students in the group in order to let them study only one subject each. Hence, "+Correct%QUESTION.NUMBER%+" (="+t+"-100) plan to study both Mathematics and Programming.

"; Feedback%QUESTION.NUMBER%+=counting_formula("M","P"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not answer this question.]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 2, 15, 0); a = myAArray; myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray; m = 100-a-p-e-pe-me-mp-c; g = 100-a; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

There are 100 students at level 1 at "+the_university()+". "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study Programming and Engineering but not Mathematics, given that "+a+" students will not study any of the 3 subjects?

" Correct%QUESTION.NUMBER% = pe; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=a; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw Venn diagram. Let M, P and E be the number of students studying Mathematics, Programming and Engineering respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

Since "+a+" students will not study any of 3 subjects, we have 100 - "+a+" = "+g+" students that will study at least one of the 3 subjects.

Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = "+g+"
"+r+" - 2n = "+g+"
n = "+c+"

indicating that "+c+" students will study all 3 subjects.

The number of students planning to study Programming and Engineering but not Mathematics is the number of elements the region "+cpe+" - n = "+cpe+" - "+c+" = "+Correct%QUESTION.NUMBER%+"."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 2, 15, 0); a = myAArray; myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray; m = 100-a-p-e-pe-me-mp-c; g = 100-a; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

There are 100 students at level 1 at "+the_university()+". "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study 2 of 3 subjects, given that "+a+" students will not study any of the 3 subjects?

" Correct%QUESTION.NUMBER% = mp+pe+me; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=a; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw Venn diagram. Let M, P and E be the number of students studying Mathematics, Programming and Engineering respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

Since "+a+" students will not study any of 3 subjects, we have 100 - "+a+" = "+g+" students that will study at least one of the 3 subjects.

Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = "+g+"
"+r+" - 2n = "+g+"
n = "+c+"

indicating that "+c+" students will study all 3 subjects.

The number of students planning to study 2 subjects is the sum of elements in three regions:

("+cmp+" - n) + ("+cpe+" - n) + ("+cme+" - n) = ("+cmp+" - "+c+") + ("+cpe+" - "+c+") + ("+cme+" - "+c+") = "+Correct%QUESTION.NUMBER%+"."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 2, 15, 0); a = myAArray; myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray; m = 100-a-p-e-pe-me-mp-c; g = 100-a; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

There are 100 students at level 1 at "+the_university()+". "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study Mathematics, Programming and Engineering, given that "+a+" students will not study any of the 3 subjects?

" Correct%QUESTION.NUMBER% = c; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=a; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw Venn diagram. Let M, P and E be the number of students studying Mathematics, Programming and Engineering respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

Since "+a+" students will not study any of 3 subjects, we have 100 - "+a+" = "+g+" students that will study at least one of the 3 subjects.

Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = "+g+"
"+r+" - 2n = "+g+"
n = "+c+"

indicating that "+c+" students will study all 3 subjects."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 2, 15, 0); a = myAArray; myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray; m = 100-a-p-e-pe-me-mp-c; g = 100-a; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

There are 100 students at level 1 at "+the_university()+". "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study Engineering, given that "+a+" students will not study any of the 3 subjects?

" Correct%QUESTION.NUMBER% = e+cpe+me; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=a; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw Venn diagram. Let M, P and E be the number of students studying Mathematics, Programming and Engineering respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

Since "+a+" students will not study any of 3 subjects, we have 100 - "+a+" = "+g+" students that will study at least one of the 3 subjects.

Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = "+g+"
"+r+" - 2n = "+g+"
n = "+c+"

indicating that "+c+" students will study all 3 subjects.

The number of students planning to study Engineering is the sum of elements in four regions:

"+e+" + ("+cme+" - n) + n + ("+cpe+" - n) = "+e+" + ("+cme+" - "+c+") + "+c+" +("+cpe+" - "+c+") = "+Correct%QUESTION.NUMBER%+"."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 2, 15, 0); a = myAArray; myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray; m = 100-a-p-e-pe-me-mp-c; g = 100-a; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

There are 100 students at level 1 at "+the_university()+". "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study Mathematics and Engineering but not Programming, given that "+a+" students will not study any of the 3 subjects?

" Correct%QUESTION.NUMBER% = me; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=a; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw Venn diagram. Let M, P and E be the number of students studying Mathematics, Programming and Engineering respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

Since "+a+" students will not study any of 3 subjects, we have 100 - "+a+" = "+g+" students that will study at least one of the 3 subjects.

Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = "+g+"
"+r+" - 2n = "+g+"
n = "+c+"

indicating that "+c+" students will study all 3 subjects.

The number of students planning to study Mathematics and Engineering but not Programming is the number of elements in the region "+cme+" - n = "+cme+" - "+c+" = "+Correct%QUESTION.NUMBER%+"."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 1, 15, 0); a = myAArray; myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray; m = 100-a-p-e-pe-me-mp-c; g = 100-a; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

A group of 100 students plan to study Mathematics, Programming and Engineering as part of their course. "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study Mathematics and Programming but not Engineering, given that "+a+" students will not study any of the 3 subjects?

" Correct%QUESTION.NUMBER% = mp; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=a; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw Venn diagram. Let M, P and E be the number of students studying Mathematics, Programming and Engineering respectively. Then we denote the number of students taking all 3 subjects by m and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

Since "+a+" studens will not study any of 3 subjects, we have 100 - "+a+" = "+g+" students that will study at least one of the 3 subjects.

Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = "+g+"
"+r+" - 2n = "+g+"
n = "+c+"

indicating that "+c+" students will study all 3 subjects.

The number of students planning to study Mathematics and Programming but not Engineering is the number of elements in the region "+cmp+" - n = "+cmp+" - "+c+" = "+Correct%QUESTION.NUMBER%+"."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 2, 15, 0); a = myAArray; myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray; m = 100-a-p-e-pe-me-mp-c; g = 100-a; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

There are 100 students at level 1 at "+the_university()+". "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study Mathematics, given that "+a+" students will not study any of the 3 subjects?

" Correct%QUESTION.NUMBER% = m+cmp+me; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=a; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw Venn diagram. Let M, P and E be the number of students studying Mathematics, Programming and Engineering respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

Since "+a+" students will not study any of 3 subjects, we have 100 - "+a+" = "+g+" students that will study at least one of the 3 subjects.

Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = "+g+"
"+r+" - 2n = "+g+"
n = "+c+"

indicating that "+c+" students will study all 3 subjects.

The number of students planning to study Mathematics is the sum of elements in four regions:

"+m+" + ("+cme+" - n) + n + ("+cmp+" - n) = "+m+" + ("+cme+" - "+c+") + "+c+" +("+cmp+" - "+c+") = "+Correct%QUESTION.NUMBER%+"."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 2, 15, 0); a = myAArray; myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray; m = 100-a-p-e-pe-me-mp-c; g = 100-a; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

There are 100 students at level 1 at "+the_university()+". "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study Programming, given that "+a+" students will not study any of the 3 subjects?

" Correct%QUESTION.NUMBER% = p+cmp+pe; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=a; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw Venn diagram. Let M, P and E be the number of students studying Mathematics, Programming and Engineering respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

Since "+a+" students will not study any of 3 subjects, we have 100 - "+a+" = "+g+" students that will study at least one of the 3 subjects.

Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = "+g+"
"+r+" - 2n = "+g+"
n = "+c+"

indicating that "+c+" students will study all 3 subjects.

The number of students planning to study Programming is the sum of elements in four regions:

"+p+" + ("+cmp+" - n) + n + ("+cpe+" - n) = "+p+" + ("+cmp+" - "+c+") + "+c+" +("+cpe+" - "+c+") = "+Correct%QUESTION.NUMBER%+"."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value; } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray; m = 100-p-e-pe-me-mp-c; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

A group of 100 students plan to study Mathematics, Programming and Engineering as part of their course. "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study Programming and Engineering but not Mathematics, given that each student must study at least one of the 3 subjects?

" Correct%QUESTION.NUMBER% = pe; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=""; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw Venn diagram. Let M, P and E be the number of students studying Mathematics, Programming and Engineering respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

There are 100 students in the group and each of them must study at least one of the 3 subjects.
Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = 100
"+r+" - 2n = 100
n = "+c+"

indicating that "+c+" students will study all 3 subjects.

The number of students planning to study Programming and Engineering but not Mathematics is the number of elements in the region "+cpe+" - n = "+cpe+" - "+c+" = "+Correct%QUESTION.NUMBER%+"."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray; m = 100-p-e-pe-me-mp-c; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

A group of 100 students plan to study Mathematics, Programming and Engineering as part of their course. "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study 2 of 3 subjects, given that each student must study at least one of the 3 subjects?

" Correct%QUESTION.NUMBER% = mp+pe+me; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=""; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw Venn diagram. Let M, P and E be the number of students studying Mathematics, Programming and Engineering respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

There are 100 students in the group and each of them must study at least one of the 3 subjects.
Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = 100
"+r+" - 2n = 100
n = "+c+"

indicating that "+c+" students will study all 3 subjects.

The number of students planning to study Mathematics is the sum of elements in three regions:

("+cmp+" - n) + ("+cpe+" - n) + ("+cme+" - n) = ("+cmp+" - "+c+") + ("+cpe+" - "+c+") + ("+cme+" - "+c+") = "+Correct%QUESTION.NUMBER%+"."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value; } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray; m = 100-p-e-pe-me-mp-c; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

A group of 100 students plan to study Mathematics, Programming and Engineering as part of their course. "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study Mathematics, Programming and Engineering, given that each student must study at least one of the 3 subjects?

" Correct%QUESTION.NUMBER% = c; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=""; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw a Venn diagram. We can regard the students taking Mathematics, Programming and Engineering as being elements of the sets M, P and E respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

There are 100 students in the group and each of them must study at least one of the 3 subjects.
Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = 100
"+r+" - 2n = 100
n = "+c+"

indicating that "+c+" students will study all 3 subjects."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray; m = 100-p-e-pe-me-mp-c; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

A group of 100 students plan to study Mathematics, Programming and Engineering as part of their course. "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study Engineering, given that each student must study at least one of the 3 subjects?

" Correct%QUESTION.NUMBER% = e+cpe+me; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=""; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw Venn diagram. Let M, P and E be the number of students studying Mathematics, Programming and Engineering respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

There are 100 students in the group and each of them must study at least one of the 3 subjects.
Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = 100
"+r+" - 2n = 100
n = "+c+"

indicating that "+c+" students will study all 3 subjects.

The number of students planning to study Engineering is the sum of elements in four regions:

"+e+" + ("+cme+" - n) + n + ("+cpe+" - n) = "+e+" + ("+cme+" - "+c+") + "+c+" +("+cpe+" - "+c+") = "+Correct%QUESTION.NUMBER%+"."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray; m = 100-p-e-pe-me-mp-c; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

A group of 100 students plan to study Mathematics, Programming and Engineering as part of their course. "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study Mathematics and Engineering but not Programming, given that each student must study at least one of the 3 subjects?

" Correct%QUESTION.NUMBER% = me; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=""; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw Venn diagram. Let M, P and E be the number of students studying Mathematics, Programming and Engineering respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

There are 100 students in the group and each of them must study at least one of the 3 subjects.
Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = 100
"+r+" - 2n = 100
n = "+c+"

indicating that "+c+" students will study all 3 subjects.

The number of students planning to study Mathematics and Engineering but not Programming is the number of elements in the region "+cme+" - n = "+cme+" - "+c+" = "+Correct%QUESTION.NUMBER%+"."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray; m = 100-p-e-pe-me-mp-c; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

A group of 100 students plan to study Mathematics, Programming and Engineering as part of their course. "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study Mathematics and Programming but not Engineering, given that each student must study at least one of the 3 subjects?

" Correct%QUESTION.NUMBER% = mp; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=""; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw Venn diagram. Let M, P and E be the number of students studying Mathematics, Programming and Engineering respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="There are 100 students in the group and each of them must study at least one of the 3 subjects.
Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = 100
"+r+" - 2n = 100
n = "+c+"

indicating that "+c+" students will study all 3 subjects.

The number of students planning to study Mathematics and Programming but not Engineering is the number of elements in the region "+cmp+" - n = "+cmp+" - "+c+" = "+Correct%QUESTION.NUMBER%+"."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray; m = 100-p-e-pe-me-mp-c; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

A group of 100 students plan to study Mathematics, Programming and Engineering as part of their course. "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study Mathematics, given that each student must study at least one of the 3 subjects?

" labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=""; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Correct%QUESTION.NUMBER% = m+cmp+me; //document.write(Correct%QUESTION.NUMBER%); Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw a Venn diagram. We can regard the students taking Mathematics, Programming and Engineering as being elements of the sets M, P and E respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

There are 100 students in the group and each of them must study at least one of the 3 subjects.
Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = 100
"+r+" - 2n = 100
n = "+c+"

indicating that "+c+" students will study all 3 subjects.

The number of students planning to study Mathematics is the sum of elements in four regions:

"+m+" + ("+cmp+" - n) + n + ("+cme+" - n) = "+m+" + ("+cmp+" - "+c+") + "+c+" +("+cme+" - "+c+") = "+Correct%QUESTION.NUMBER%+"."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>
Foundationdefault_logic_svgHard function process%QUESTION.NUMBER%(QNo) { COR = Correct%QUESTION.NUMBER%; ANS1= Feedback1%QUESTION.NUMBER%; ANS2= Feedback2%QUESTION.NUMBER%; SVG = svg%QUESTION.NUMBER% SHOW = "" for (var i=5; iYour answer, "+document.forms.elements[item].value+", was correct.
"} else {document.forms.elements[item+3].value = "Your answer "+document.forms.elements[item].value+", should have been "+COR+"

"+ANS1+"
"+SVG+"
"+ANS2+"
"+SHOW+"
"} document.forms.elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms.elements[item+3].value } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray; pe = myKArray; me = myKArray; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray; m = 100-p-e-pe-me-mp-c; r = m+p+e+cmp+cpe+cme; QuestionText%QUESTION.NUMBER% = "

A group of 100 students plan to study Mathematics, Programming and Engineering as part of their course. "+m+" plan to study only Mathematics, "+p+" only Programming and "+e+" only Engineering. "+cmp+" will study Mathematics and Programming, "+cme+" Mathematics and Engineering, "+cpe+" Programming and Engineering. How many plan to study Programming, given that each student must study at least one of the 3 subjects?

" Correct%QUESTION.NUMBER% = p+cmp+pe; //document.write(Correct%QUESTION.NUMBER%); labels = new Array(); labels='M' labels='P' labels='E' numbers = new Array(); numbers=m; numbers=cmp+"-n"; numbers=p; numbers=cme+"-n"; numbers="n"; numbers=cpe+"-n"; numbers=e; numbers=""; svg_Venn= SVG_Venn(labels,numbers); svg%QUESTION.NUMBER% = svg_Venn + "
" Feedback1%QUESTION.NUMBER%="

One of the ways to solve this problem is to draw Venn diagram. Let M, P and E be the number of students studying Mathematics, Programming and Engineering respectively. Then we denote the number of students taking all 3 subjects by n and hence we are able to illustrate all the given information by the following Venn diagram."; Feedback2%QUESTION.NUMBER%="

There are 100 students in the group and each of them must study at least one of the 3 subjects.
Thus, from the Venn diagram,

"+m+" + ("+cmp+" - n) + n + "+p+" + ("+cpe+" - n) + "+e+" + ("+cme+" - n) = 100
"+r+" - 2n = 100
n = "+c+"

indicating that "+c+" students will study all 3 subjects.

The number of students planning to study Programming is the sum of elements in four regions:

"+p+" + ("+cmp+" - n) + n + ("+cpe+" - n) = "+p+" + ("+cmp+" - "+c+") + "+c+" +("+cpe+" - "+c+") = "+Correct%QUESTION.NUMBER%+"."; Feedback2%QUESTION.NUMBER%+=counting_formula("M","P","E"); document.write(QuestionText%QUESTION.NUMBER%); document.write("") document.write("") } if (document.forms.name=="FEEDBACK") {} else {question%QUESTION.NUMBER%()} ]]> "Choice" INCLUDES NOCASE "was Correct"Well done!]]> "Choice" INCLUDES NOCASE "should have been"Your answer was wrong.]]> OTHERYou did not give an answer!]]> if (document.forms.name=="FEEDBACK") { Count=document.forms.elements.length document.write(document.forms.elements[Count-1].value) var titleofpopup = "Related material"; var help = wheretolook("%QUESTION.TAGS%","%QUESTION.TOPIC%"); document.write("

"+""+"
") } ]]>