Site hosted by Angelfire.com: Build your free website today!
'; OutString += '
'; OutString += NavBar; if (Feedback.length>0){ OutString += '' } OutString += '
'; OutString += ''; OutString += Feedback; OutString += '
'; //Write it to the frame TopFrame.document.clear(); TopFrame.document.open(); TopFrame.document.write(OutString); TopFrame.document.close(); } function StartUp(){ //Reduce array if required if (QsToShow < I.length){ ReduceItems(); } //Shuffle stuff if required if (ShuffleQs == true){ I = Shuffle(I); } if (ShuffleAs == true){ for (var i=0; iEnd if
The condition is:'; I[10][1] = new Array(); I[10][1][0] = new Array(); I[10][1][0][0]='lblmessage.caption="\'A\'Honor Roll!"
'; I[10][1][0][1]=''; I[10][1][0][2] = 0; I[10][1][1] = new Array(); I[10][1][1][0]='If.'; I[10][1][1][1]=''; I[10][1][1][2] = 0; I[10][1][2] = new Array(); I[10][1][2][0]='End if'; I[10][1][2][1]=''; I[10][1][2][2] = 0; I[10][1][3] = new Array(); I[10][1][3][0]='intGPA>=93'; I[10][1][3][1]=''; I[10][1][3][2] = 1; I[10][2] = 0; I[11] = new Array(); I[11][0]='The If .. Then statment is what type of structure?'; I[11][1] = new Array(); I[11][1][0] = new Array(); I[11][1][0][0]='Decision'; I[11][1][0][1]=''; I[11][1][0][2] = 1; I[11][1][1] = new Array(); I[11][1][1][0]='Logical'; I[11][1][1][1]=''; I[11][1][1][2] = 0; I[11][1][2] = new Array(); I[11][1][2][0]='Relantional'; I[11][1][2][1]=''; I[11][1][2][2] = 0; I[11][1][3] = new Array(); I[11][1][3][0]='Gerneral'; I[11][1][3][1]=''; I[11][1][3][2] = 0; I[11][2] = 0; I[12] = new Array(); I[12][0]='The If.. Then statement executes code when which of the following is true?'; I[12][1] = new Array(); I[12][1][0] = new Array(); I[12][1][0][0]='Assignment'; I[12][1][0][1]=''; I[12][1][0][2] = 0; I[12][1][1] = new Array(); I[12][1][1][0]='Fucntion'; I[12][1][1][1]=''; I[12][1][1][2] = 0; I[12][1][2] = new Array(); I[12][1][2][0]='Condition'; I[12][1][2][1]=''; I[12][1][2][2] = 1; I[12][1][3] = new Array(); I[12][1][3][0]='Loop'; I[12][1][3][1]=''; I[12][1][3][2] = 0; I[12][2] = 0; I[13] = new Array(); I[13][0]='Decision structures are used to:'; I[13][1] = new Array(); I[13][1][0] = new Array(); I[13][1][0][0]='Control funtions'; I[13][1][0][1]=''; I[13][1][0][2] = 0; I[13][1][1] = new Array(); I[13][1][1][0]='Create a condition'; I[13][1][1][1]=''; I[13][1][1][2] = 0; I[13][1][2] = new Array(); I[13][1][2][0]='Conditinally execute a set of statements'; I[13][1][2][1]=''; I[13][1][2][2] = 1; I[13][1][3] = new Array(); I[13][1][3][0]='Allow a program to flow continuosly'; I[13][1][3][1]=''; I[13][1][3][2] = 0; I[13][2] = 0; I[14] = new Array(); I[14][0]='When creating multiple IF...THEN...ELSEIF clasuses, it is optional to use the last:'; I[14][1] = new Array(); I[14][1][0] = new Array(); I[14][1][0][0]='Then'; I[14][1][0][1]=''; I[14][1][0][2] = 0; I[14][1][1] = new Array(); I[14][1][1][0]='Else'; I[14][1][1][1]=''; I[14][1][1][2] = 1; I[14][1][2] = new Array(); I[14][1][2][0]='Elseif'; I[14][1][2][1]=''; I[14][1][2][2] = 0; I[14][1][3] = new Array(); I[14][1][3][0]='End if'; I[14][1][3][1]=''; I[14][1][3][2] = 0; I[14][2] = 0; I[15] = new Array(); I[15][0]='In an If... Then atatment an Else clause would be executed when the If condition to '; I[15][1] = new Array(); I[15][1][0] = new Array(); I[15][1][0][0]='False'; I[15][1][0][1]=''; I[15][1][0][2] = 1; I[15][1][1] = new Array(); I[15][1][1][0]='True'; I[15][1][1][1]=''; I[15][1][1][2] = 0; I[15][1][2] = new Array(); I[15][1][2][0]='Greater than 0'; I[15][1][2][1]=''; I[15][1][2][2] = 0; I[15][1][3] = new Array(); I[15][1][3][0]='less than 0'; I[15][1][3][1]=''; I[15][1][3][2] = 0; I[15][2] = 0; I[16] = new Array(); I[16][0]='The if...Then..elseif statement is used'; I[16][1] = new Array(); I[16][1][0] = new Array(); I[16][1][0][0]='To correct logic errors in an action'; I[16][1][0][1]=''; I[16][1][0][2] = 0; I[16][1][1] = new Array(); I[16][1][1][0]='To allow the order in which statements are executed to vary'; I[16][1][1][1]=''; I[16][1][1][2] = 0; I[16][1][2] = new Array(); I[16][1][2][0]='to obtain a value that is stored'; I[16][1][2][1]=''; I[16][1][2][2] = 0; I[16][1][3] = new Array(); I[16][1][3][0]='to decide among multiple actions'; I[16][1][3][1]=''; I[16][1][3][2] = 1; I[16][2] = 0; I[17] = new Array(); I[17][0]='In an if...than statment the equal sign is used for:'; I[17][1] = new Array(); I[17][1][0] = new Array(); I[17][1][0][0]='Comparions'; I[17][1][0][1]=''; I[17][1][0][2] = 0; I[17][1][1] = new Array(); I[17][1][1][0]='assignment'; I[17][1][1][1]=''; I[17][1][1][2] = 0; I[17][1][2] = new Array(); I[17][1][2][0]='comparison and assignment'; I[17][1][2][1]=''; I[17][1][2][2] = 1; I[17][1][3] = new Array(); I[17][1][3][0]='summarization'; I[17][1][3][1]=''; I[17][1][3][2] = 0; I[17][2] = 0; I[18] = new Array(); I[18][0]='The indentation used in the IF..then..else statement'; I[18][1] = new Array(); I[18][1][0] = new Array(); I[18][1][0][0]='Identifies the placement of the action'; I[18][1][0][1]=''; I[18][1][0][2] = 0; I[18][1][1] = new Array(); I[18][1][1][0]='has no effect on the execution'; I[18][1][1][1]=''; I[18][1][1][2] = 1; I[18][1][2] = new Array(); I[18][1][2][0]='Must be exacty 5 spaces'; I[18][1][2][1]=''; I[18][1][2][2] = 0; I[18][1][3] = new Array(); I[18][1][3][0]='is only used in large complex statements'; I[18][1][3][1]=''; I[18][1][3][2] = 0; I[18][2] = 0; I[19] = new Array(); I[19][0]='The statments of an If..then'; I[19][1] = new Array(); I[19][1][0] = new Array(); I[19][1][0][0]='can be only single statements'; I[19][1][0][1]=''; I[19][1][0][2] = 0; I[19][1][1] = new Array(); I[19][1][1][0]='can only be multiple statements'; I[19][1][1][1]=''; I[19][1][1][2] = 0; I[19][1][2] = new Array(); I[19][1][2][0]='can be single or multiple statements'; I[19][1][2][1]=''; I[19][1][2][2] = 1; I[19][1][3] = new Array(); I[19][1][3][0]='cannot be used with the else option'; I[19][1][3][1]=''; I[19][1][3][2] = 0; I[19][2] = 0; Status = new Array(); function CreateStatusArrays(){ for (var x=0; x-1){ FirstBit = InString.substring(0, i); LastBit = InString.substring(i + Token.length, InString.length); InString = FirstBit + Replacement + LastBit; i = InString.indexOf(Token); } return InString; } function ChangeQ(ChangeBy){ var NewNum = CurrQNum + ChangeBy; if ((NewNum >= 0)&&(NewNum
'; } Output = Output + BuildQuestion(I.length-1); Output = TableOpener + Output + TableCloser; DisplayExercise(Output); } function ShowQuestion(QNum){ //First, create the Q number readout at the top var Readout = (QNum+1) + '/' + I.length; while (Readout.length < 7){ Readout = ' ' + Readout + ' '; } Readout = QButtonsOpener + Readout + QButtonsCloser; var Output = BuildQuestion(QNum); Output = TableOpener + Output + TableCloser; DisplayExercise(Readout + Output); //Mark the answers already done for (i=0; i=0; i--){ //Find any incorrect choices var b = eval('BottomFrame.document.QForm.A_' + QNum + '_' + i); if (b != null){ //if it's wrong, count it if (b.checked == true){ Status[QNum][1][i] = 'C'; } else{ Status[QNum][1][i] = 'U'; } if (((b.checked == true) && (b.value == "0"))||((b.checked == false)&&(b.value == "1"))){ TotWrong++; } } } if (TotWrong == 0){ Output = DefaultRight; } else{ Output = DefaultWrong + '
' + (TotAns-TotWrong) + '/' + TotAns; } //If you haven't tried the question before if (Status[QNum][0] == 0){ if (TotWrong > 0){ Status[QNum][2]++; } if (TotWrong == 0){ Status[QNum][0] = 1; //Calculate the score for this question as a floating-point fraction of 1 Status[QNum][3] = ((Status[QNum][1].length - Status[QNum][2]) - 1) / (Status[QNum][1].length - 1); //If less than zero, set to zero if (Status[QNum][3] < 0){Status[QNum][3] = 0;} } } //Check whether the quiz is finished var Finished = true; for (var i=0; i' + YourScoreIs + ' ' + Score + '%.'; } if (Finished == true){ EraseFeedback = false; var CFT = 0; for (i=0; i 0){ WriteFeedback(Output); } } function CheckAnswer(QNum, ANum){ var Output = I[QNum][1][ANum][1]; if (Output==''){ if (I[QNum][1][ANum][2] == 1){ Output = DefaultRight; } else{ Output = DefaultWrong; } } //If it's not been previously answered correctly if (Status[QNum][0] == 0){ //If it's a correct answer if (I[QNum][1][ANum][2] == 1){ Status[QNum][0] = 1;//Mark the Q as done Status[QNum][1][ANum] = 'R'; MarkAnswer(QNum, ANum, true); //Calculate the score for this question as a floating-point fraction of 1 var PossibleWrongs = 0; for (var i=0; i' + YourScoreIs + ' ' + Score + '%.'; } if (Finished == true){ EraseFeedback = false; var CFT = 0; for (i=0; i 0){ WriteFeedback(Output); } } function MarkAnswer(QNum, ANum, Right){ var Mark = CorrectIndicator; if (Right == false){Mark = IncorrectIndicator;} if (eval('BottomFrame.document.QForm.FB_' + QNum + '_' + ANum) != null){ eval('BottomFrame.document.QForm.FB_' + QNum + '_' + ANum).value = Mark; } } function CheckCheckbox(QNum, ANum){ if (eval('BottomFrame.document.QForm.A_' + QNum + '_' + ANum) != null){ eval('BottomFrame.document.QForm.A_' + QNum + '_' + ANum).checked = true; } } function Blank(){ return '©Half-Baked Software. Loading...'; } //--> //]]>