<%@ 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 = 15 ' 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") 'Editable 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 If studAns(10) <> "" Then objRecordset.Fields("Ans 11") = studAns(10) End If If studAns(11) <> "" Then objRecordset.Fields("Ans 12") = studAns(11) End If If studAns(12) <> "" Then objRecordset.Fields("Ans 13") = studAns(12) End If If studAns(13) <> "" Then objRecordset.Fields("Ans 14") = studAns(13) End If If studAns(14) <> "" Then objRecordset.Fields("Ans 15") = studAns(14) 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, "(", "") 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, "99") 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, "stuans99", grades, trynums) End If ' grades = 0 %> Virtual CrezLab - Qualitative Analysis - The Laboratory Challenge
 
 
 


The Laboratory Challenge

Lab Challenge 4

Modified GCE `O' Level Chemistry Practical

Observe the following demo experiment on solid R and solution S. Record your observations in the table given. You should identify and name any gas evolved.

Solid R
Solution S

Test
Play Movie
Observations
1) Put half of your sample of R into a hard glass tube and heat strongly until no further change is observed. You should test for the gas evolved. Allow the residue to cool.

View experiment 1a

View experiment 1b

View experiment 1c

View experiment 1d

1a)
Ask the expert

 

Solution S has been prepared for you by dissolving the residue from Test 1 in dilute nitric acid. Use solution S for Tests 2 and 3.


Ask the expert

2a) To a portion of solution S, add aqueous sodium hydroxide until a change is seen

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

2a)
Ask the expert

2b)
Ask the expert

3) To a portion of solution S, add aqueous potassium iodide.

3)
Ask the expert

4a) To a portion of solid R, add a small volume of dilute sulphuric acid followed by an equal volume of aqueous potassium iodide. Allow the mixture to stand for a few minutes.

b) Pour off some of the solution from (a) into a clean test tube and then add an equal volume of aqueous sodium thiosulphate.

View experiment 4a

View experiment 4b

4a)
Ask the expert

4b)
Ask the expert

5) To a portion of solid R, add a small volume of concentrated hydrochloric acid and leave to stand for a few minutes, shaking occasionally.

5)
Ask the expert

When the reaction in Test 5 has stopped, add distilled water until the test-tube is about half full. Allow any solid to settle and pour off the solution into a clean test-tube and use this solution for Tests 6 and 7.


Ask the expert

6a) To a portion of solution from Test 5, add aqueous sodium hydroxide until a change is seen.

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

View experiment

6a)
Ask the expert

6b)
Ask the expert

7a) To a portion of solution of solution from Test 5, add a few drops of aqueous potassium iodide.

b) Add excess aqueous potassium iodide to the mixture from (a).

View experiment 7a

View experiment 7b

7a)
Ask the expert

Conclusions

Solid R contains two elements.

The non-metallic element in R is

Give one property of R and the number of the test which suggests this property.

Property of R Test Number

 

<% 'Else ' Session("trynums") = "" 'End if%>


Prev     1     2     3     4     5     Next

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

All rights reserved.