<%@ LANGUAGE=VBSCRIPT %> <% 'Variables Dim Name, cStandAns, grades, trynums Dim DB_CONNECTIONSTRING, defaultQuestions 'grades = 0 'Editable Dim ansText(50) ' Correct or Wrong Dim studAns(50) ' Student answers array Dim standAns(50) ' Standard answers array defaultQuestions = 10 ' If you want to add in more question, make sure the NAME in the HTML tag and ' the array index are in running sequence. %> <% 'Functions Sub getStandAnsRec(connectionStr, tablename) Dim objRecordset, conn Set conn=Server.CreateObject("ADODB.Connection") conn.Open connectionStr cStandAns = 0 Set objRecordset = Server.CreateObject("ADODB.Recordset") objRecordset.Open "SELECT * FROM " & tablename, conn,1,3 if not objRecordset.EOF then while not objRecordset.EOF standAns(cStandAns) = objRecordset("Observations") objRecordset.MoveNext() cStandAns = cStandAns + 1 wend end if objRecordset.close conn.close conn = null End Sub Sub addNewStudAnsRec(connectionStr, tablename, grades, trynums) Dim objRecordset, conn Set conn=Server.CreateObject("ADODB.Connection") conn.Open connectionStr Set objRecordset = Server.CreateObject("ADODB.Recordset") objRecordset.Open tablename, connectionStr, adOpenStatic, adLockPessimistic objRecordset.AddNew objRecordset.Fields("Name") = Name objRecordset.Fields("Date Added") = Now() objRecordset.Fields("userName") = Session("MyRealName") objRecordset.Fields("Class") = Session("MyClass") If studAns(0) <> "" Then objRecordset.Fields("Ans 1") = studAns(0) End If If studAns(1) <> "" Then objRecordset.Fields("Ans 2") = studAns(1) End If If studAns(2) <> "" Then objRecordset.Fields("Ans 3") = studAns(2) End If If studAns(3) <> "" Then objRecordset.Fields("Ans 4") = studAns(3) End IF If studAns(4) <> "" Then objRecordset.Fields("Ans 5") = studAns(4) End If If studAns(5) <> "" Then objRecordset.Fields("Ans 6") = studAns(5) End If If studAns(6) <> "" Then objRecordset.Fields("Ans 7") = studAns(6) End If If studAns(7) <> "" Then objRecordset.Fields("Ans 8") = studAns(7) End If If studAns(8) <> "" Then objRecordset.Fields("Ans 9") = studAns(8) End If If studAns(9) <> "" Then objRecordset.Fields("Ans 10") = studAns(9) End If objRecordset.Fields("Grades") = grades 'response.write grades objRecordset.Fields("Try Number") = trynums objRecordset.Update objRecordset.Close conn.close conn = null End Sub Function concate (studAns) studAns = Replace(studAns, "vbCrLf", " ") studAns = Replace(studAns, ",", " ") studAns = Replace(studAns, ".", " ") studAns = Replace(studAns, ";", " ") studAns = Replace(studAns, "_", " ") studAns = Replace(studAns, "-", " ") studAns = Replace(studAns, "precipitate", "ppt ") studAns = Replace(studAns, "sol ", "solution ") studAns = Replace(studAns, "visible ", "apparent ") studAns = Replace(studAns, "relights ", "rekindled ") studAns = Replace(studAns, "decolorise ", "turned colourless ") studAns = Replace(studAns, "dissolves ", "dissolved ") studAns = Replace(studAns, "dissolved ", "dissolved ") studAns = Replace(studAns, "turn ", "turned ") studAns = Replace(studAns, "evolve ", "evolved ") studAns = Replace(studAns, "form ", "formed ") studAns = Replace(studAns, "pale ", "light ") studAns = Replace(studAns, "deep ", "dark ") studAns = Trim(studAns) Do While InStr(1, studAns, " ") studAns = Replace(studAns, " ", " ") Loop End Function Function isAnswerCorrect(standAns, studAns) Dim i, ansFound Dim standAnsArr, studAnsArr Call concate (studAns) studAnsArr = Split(studAns, " ") standAnsArr = Split(standAns, " ") For i = 0 to UBound(standAnsArr) ansFound = false For j = 0 to UBound(studAnsArr) if LCase(studAnsArr(j)) = LCase(standAnsArr(i)) then ansFound = true Exit For end if next if ansFound = false then isAnswerCorrect = false Exit Function end if next isAnswerCorrect = true End Function %> <% ' Conditions DB_CONNECTIONSTRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("checkdata.mdb") & ";" if Request.Form("Submit") = "Submit Answers" Then Name = Session("MyName") trynums = Session("trynums") Call getStandAnsRec(DB_CONNECTIONSTRING, "97") if trynums = "" then trynums = 1 else trynums = CInt(trynums) + 1 end if Session("trynums") = trynums For i = 0 To defaultQuestions studAns(i) = Request.form("q" & (i+1)) Next grades = -1 'if trynums < 2 then ' For i = 0 To defaultQuestions ' if isAnswerCorrect(standAns(i), studAns(i)) then ' ' grades = grades + 1 ' ' ansText(i) = "Correct" ' else ' ansText(i) = "Wrong" ' end if ' Next 'else ' For i = 0 To defaultQuestions ' if isAnswerCorrect(standAns(i), studAns(i)) then ' grades = grades + 1 ' ansText(i) = "Correct
" & standAns(i) ' else ' ansText(i) = "Wrong
" & standAns(i) ' end if ' Next 'end if Call addNewStudAnsRec(DB_CONNECTIONSTRING, "stuans97", grades, trynums) End If ' grades = 0 %> Virtual CrezLab - Qualitative Analysis - The Laboratory Challenge
 
 
 


The Laboratory Challenge

Lab Challenge 2

Modified GCE `O' Level Chemistry Practical

Observe the following demo experiment on solution T and record your observations in the table given. You should identify and name any gas evolved.


Test
Play Video
Observations
1a) To a portion of solution T, add aqueous sodium hydroxide until a change is seen.

1b) Add excess aqueous sodium hydroxide to the mixture from (a)

1a)
Ask the expert


1b)
Ask the expert

2a) To a portion of solution T, add aqueous ammonia until a change is seen.

2b) Add excess aqueous ammonia to the mixture from (a)

2a)
Ask the expert

2b)
Ask the expert

3a) To a portion of solution T, add aqueous silver nitrate.

b) Add aqueous ammonia to the mixture from (a).

c) To a portion of the mixture from (b), add dilute nitric acid.

3a)
Ask the expert

3b)
Ask the expert

3c)
Ask the expert

4) To a portion of solution T, add an equal volume of aqueous sodium hydrogen carbonate. 4)
Ask the expert

Conclusions

The formula of the anion present in solution T is

The formula of the cation present in solution T are


Prev     1     2     3    4     5     Next

Copyright © 2001 Crescent Girls' School, ASKnLearn.com Pte Ltd.

All rights reserved.