<%
response.write("")
dim score
dim quest1
dim quest2
dim quest3
dim quest4
dim quest5
dim quest6
dim quest7
dim quest8
dim quest9
dim quest10
score = 0
quest1 = lcase(request.form("tfquest1"))
quest2 = lcase(request.form("tfquest2"))
quest3 = lcase(request.form("tfquest3"))
quest4 = lcase(request.form("tfquest4"))
quest5 = lcase(request.form("tfquest5"))
quest6 = lcase(request.form("tfquest6"))
quest7 = lcase(request.form("tfquest7"))
quest8 = lcase(request.form("tfquest8"))
quest9 = lcase(request.form("tfquest9"))
quest10 = lcase(request.form("tfquest10"))
response.write "Quiz Grading"
response.write "
"
if trim(quest1) = "false" then
score = score + 1
response.write "1) That's correct - the correct answer is the IDENTIFICATION DIVISION (not the INDENTIFICATION DIVISION)"
response.write " "
else
response.write "1) Sorry - it should be IDENTIFICATION not INDENTIFICATION!"
response.write " "
end if
response.write " "
if trim(quest2) = "true" then
score = score + 1
response.write "2) Correct - yes - you specify the INPUT and OUTPUT files using the SELECT clause"
response.write " "
else
response.write "2) Sorry - you specify the INPUT and OUTPUT files using the SELECT clause in the Environment Division"
response.write " "
end if
response.write " "
if trim(quest3) = "true" then
response.write "3) Correct - yes, in the FILE SECTION and the WORKING-STORAGE SECTION."
score = score + 1
response.write " "
else
response.write "3) Wrong - we specify the data in the FILE SECTION and the WORKING-STORAGE SECTION"
response.write " "
end if
response.write " "
if trim(quest4) = "false" then
score = score + 1
response.write "4) Correct - it is called the PROCEDURE DIVISION - not the PROCESSING DIVISION"
response.write " "
else
response.write "4) Sorry - it is called the PROCEDURE DIVISION - not the PROCESSING DIVISION"
response.write " "
end if
response.write " "
if trim(quest5) = "false" then
score = score + 1
response.write "5) Correct on #5 - the PIC would be 999V99 (instead of 999.99) - the V means an implied decimal place"
response.write " "
else
response.write "5) Sorry - it should be PIC 999V99 - as the V is an implied decimal point"
response.write " "
end if
response.write " "
if trim(quest6) = "true" then
score = score + 1
response.write "6) Yes - X(20) is for 20 characters"
response.write " "
else
response.write "6) No - X(20) is for 20 characters (including spaces)"
response.write " "
end if
response.write " "
if trim(quest7) = "true" then
score = score + 1
response.write "7) Yes - ZZ9.99 or $ZZ9.99 would zero suppress and put a decimal point on printed output"
response.write " "
else
response.write "7) On Question 7 - - ZZ9.99 or $ZZ9.99 would be the best answers to zero suppress and put a decimal point on the output"
response.write " "
end if
response.write " "
if trim(quest8) = "true" then
score = score + 1
response.write "8) Correct - STOP RUN will be the last statement executed"
response.write " "
else
response.write "8) Sorry on #8 - the STOP RUN statement will be the last statement executed"
response.write " "
end if
response.write " "
if trim(quest9) = "true" then
score = score + 1
response.write "9) Yes - we need to open the files - generally in the initialization / pre-processing paragraph (or in a module called by the initialization module)"
response.write " "
else
response.write "9) No - - either EXIT PROGRAM or GOBACK will return us to the main program"
response.write " "
end if
response.write " "
if trim(quest10) = "false" then
score = score + 1
response.write "10) Question #10 is correct - use the PERFORM statement rather than the CALL statement"
response.write " "
else
response.write "10) Sorry on #10 - use the PERFORM rather than the CALL statement"
response.write " "
end if
response.write " "
response.write " "
response.write " "
response.write " "
response.write "You had a score of " & score & " right on this quiz"
%>