"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 10, 20 , 0); a = myAArray[0]; myMArray = displayarray( 1, 45, 60, 0); m = myMArray[0]; myPArray = displayarray( 1, 45, 60, 0); p = myPArray[0]; 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[0].name=="FEEDBACK")
{}
else
{question%QUESTION.NUMBER%()}
]]>

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myMArray = displayarray( 1, 50, 70 , 0); m = myMArray[0]; myPArray = displayarray( 1, 50, 70 , 0); p = myPArray[0]; 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[0].name=="FEEDBACK")
{}
else
{question%QUESTION.NUMBER%()}
]]>

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 2, 15, 0); a = myAArray[0]; myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]=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+" +

"+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[0].name=="FEEDBACK")
{}
else
{question%QUESTION.NUMBER%()}
]]>

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 2, 15, 0); a = myAArray[0]; myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]=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+" +

"+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:

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 2, 15, 0); a = myAArray[0]; myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]=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+" +

"+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[0].name=="FEEDBACK")
{}
else
{question%QUESTION.NUMBER%()}
]]>

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 2, 15, 0); a = myAArray[0]; myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]=a;
svg_Venn= SVG_Venn(labels,numbers);
svg%QUESTION.NUMBER% = svg_Venn + "

"
Feedback1%QUESTION.NUMBER%="

*n* and hence we are able to illustrate all the given information by the following Venn diagram.";
Feedback2%QUESTION.NUMBER%="

Thus, from the Venn diagram,

"+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+" +

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 2, 15, 0); a = myAArray[0]; myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]=a;
svg_Venn= SVG_Venn(labels,numbers);
svg%QUESTION.NUMBER% = svg_Venn + "

"
Feedback1%QUESTION.NUMBER%="

*n* and hence we are able to illustrate all the given information by the following Venn diagram.";
Feedback2%QUESTION.NUMBER%="

Thus, from the Venn diagram,

"+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[0].name=="FEEDBACK")
{}
else
{question%QUESTION.NUMBER%()}
]]>

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 1, 15, 0); a = myAArray[0]; myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]=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,

"+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[0].name=="FEEDBACK")
{}
else
{question%QUESTION.NUMBER%()}
]]>

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 2, 15, 0); a = myAArray[0]; myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]=a;
svg_Venn= SVG_Venn(labels,numbers);
svg%QUESTION.NUMBER% = svg_Venn + "

"
Feedback1%QUESTION.NUMBER%="

*n* and hence we are able to illustrate all the given information by the following Venn diagram.";
Feedback2%QUESTION.NUMBER%="

Thus, from the Venn diagram,

"+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+" +

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myAArray = displayarray( 1, 2, 15, 0); a = myAArray[0]; myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-a-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]=a;
svg_Venn= SVG_Venn(labels,numbers);
svg%QUESTION.NUMBER% = svg_Venn + "

"
Feedback1%QUESTION.NUMBER%="

*n* and hence we are able to illustrate all the given information by the following Venn diagram.";
Feedback2%QUESTION.NUMBER%="

Thus, from the Venn diagram,

"+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+" +

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value; } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]="";
svg_Venn= SVG_Venn(labels,numbers);
svg%QUESTION.NUMBER% = svg_Venn + "

"
Feedback1%QUESTION.NUMBER%="

*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+" +

"+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[0].name=="FEEDBACK")
{}
else
{question%QUESTION.NUMBER%()}
]]>

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]="";
svg_Venn= SVG_Venn(labels,numbers);
svg%QUESTION.NUMBER% = svg_Venn + "

"
Feedback1%QUESTION.NUMBER%="

*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+" +

"+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:

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value; } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]="";
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+" +

"+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[0].name=="FEEDBACK")
{}
else
{question%QUESTION.NUMBER%()}
]]>

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]="";
svg_Venn= SVG_Venn(labels,numbers);
svg%QUESTION.NUMBER% = svg_Venn + "

"
Feedback1%QUESTION.NUMBER%="

*n* and hence we are able to illustrate all the given information by the following Venn diagram.";
Feedback2%QUESTION.NUMBER%="

Thus, from the Venn diagram,

"+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+" +

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]="";
svg_Venn= SVG_Venn(labels,numbers);
svg%QUESTION.NUMBER% = svg_Venn + "

"
Feedback1%QUESTION.NUMBER%="

*n* and hence we are able to illustrate all the given information by the following Venn diagram.";
Feedback2%QUESTION.NUMBER%="

Thus, from the Venn diagram,

"+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[0].name=="FEEDBACK")
{}
else
{question%QUESTION.NUMBER%()}
]]>

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]="";
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,

"+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[0].name=="FEEDBACK")
{}
else
{question%QUESTION.NUMBER%()}
]]>

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]="";
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%="

Thus, from the Venn diagram,

"+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+" +

"+""+"

") } ]]>

"} else {document.forms[0].elements[item+3].value = "Your answer "+document.forms[0].elements[item].value+", should have been "+COR+"

"+ANS1+"

"+SVG+"

"+ANS2+"

"+SHOW+" "} document.forms[0].elements[item+3].value = QuestionText%QUESTION.NUMBER%+document.forms[0].elements[item+3].value } function question%QUESTION.NUMBER%() { myCArray = displayarray( 1, 2, 7, 0); c = myCArray[0]; myKArray = displayarray( 3, 1, 7, 0); mp = myKArray[0]; pe = myKArray[1]; me = myKArray[2]; cmp = c + mp; cpe = c + pe; cme = c + me myPArray = displayarray( 1, 15, 35 , 0); p = myPArray[0]; myEArray = displayarray( 1, 15, 99-p-cpe-me-mp , 0); e = myEArray[0]; 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[0]='M'
labels[1]='P'
labels[2]='E'
numbers = new Array();
numbers[0]=m;
numbers[1]=cmp+"-n";
numbers[2]=p;
numbers[3]=cme+"-n";
numbers[4]="n";
numbers[5]=cpe+"-n";
numbers[6]=e;
numbers[7]="";
svg_Venn= SVG_Venn(labels,numbers);
svg%QUESTION.NUMBER% = svg_Venn + "

"
Feedback1%QUESTION.NUMBER%="

*n* and hence we are able to illustrate all the given information by the following Venn diagram.";
Feedback2%QUESTION.NUMBER%="

Thus, from the Venn diagram,

"+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+" +

"+""+"

") } ]]>