Acids"); for(j=0;j<=36;j++){ if(j==19){cont.document.writeln ("")}; cont.document.writeln("")}; cont.document.writeln("
Bases
",compound[j]['name'],""); cont.document.writeln("",compound[j]['formula'],""); cont.document.writeln("",sigfigs(compound[j]['K']),"
"); cont.document.writeln(""); cont.document.close(); cont.focus(); } function startit(){ clear() totl++ document.forms[0].total.value=totl getspecies() } function getspecies(){ first=Math.floor(19*Math.random()) if(Math.random()>.5){ option=1 cmpd[0]=compound[first][0] cmpd[2]=compound[first][1] k1=compound[first][2] acidk=0 } else{ option=2 cmpd[1]=compound[first][1] cmpd[3]=compound[first][0] k2=1e-14/compound[first][2] basek=1 } second=first while(second==first){second=Math.floor(37*Math.random()) if(option==1){ if(second<19){ cmpd[1]=compound[second][1] cmpd[3]=compound[second][0] k2=1e-14/compound[second][2] basek=2 } else{ cmpd[1]=compound[second][0] cmpd[3]=compound[second][1] k2=compound[second][2] basek=0 } } else if(second<19){ cmpd[0]=compound[second][0] cmpd[2]=compound[second][1] k1=compound[second][2] acidk=0 } else{ cmpd[0]=compound[second][1] cmpd[2]=compound[second][0] k1=1e-14/compound[second][2] acidk=1 } } thereaction=cmpd[0]+" + "+cmpd[1]+" => " +cmpd[2]+" + "+cmpd[3] K=k1*k2/1e-14 showK[0]=number(k1,2,2) showK[1]=number(k2,2,2) showK[2]=number(K,2,2) buildquestion(option,first,second) } function buildquestion(){ thequest="Calculate the value of the equilibrium constant for the following proton transfer reaction:
"+thereaction showquest(thequest) buildanswer() } function buildanswer(){ theanswer="Krxn=Ka*Kb/Kw
In this case,
" if(option==1){ theanswer+=("Ka for "+cmpd[0]+"="+showK[0]) theanswer+="
" basek==0?theanswer+=("Kb for "+cmpd[1]+"="+showK[1]):theanswer+=(cmpd[1]+" is the conjugate base of " + compound[second][0]+". Its Kb=Kw/Ka=1*10-14/"+number(compound[second][2],2,2)+"="+showK[1]) } else{ acidk==0?theanswer+=("Ka for "+cmpd[0]+"="+showK[0]):theanswer+=(cmpd[0]+" is the conjugate acid of " + compound[second][0]+". Its Ka=Kw/Kb=1*10-14/"+number(compound[second][2],2,2)+"="+showK[0]); theanswer+="
"+(cmpd[1]+" is the conjugate base of " + compound[first][0]+". Its Kb=Kw/Ka=1*10-14/"+number(compound[first][2],2,2)+"="+showK[1]) } theanswer+="
" theanswer+=(showK[0]+"*"+showK[1]+"/10-14="+showK[2]) } function showquest(thequest){ if(ie4){ qspot.innerHTML=thequest } else{ document.qspot.document.open() document.qspot.document.write(thequest,"
") document.qspot.document.close() } } function showanswer(){ if(attempts>=3){ if(ie4){ ansspot.innerHTML=theanswer } else{ document.ansspot.document.open() document.ansspot.document.write(theanswer) document.ansspot.document.close() } } } function clearansspot(){ if(ie4){ ansspot.innerHTML="" } else{ document.ansspot.document.open() document.ansspot.document.clear() document.ansspot.document.close() } } function answer(ans){ if(tried==1)alert("You've done this one. Get a new problem."); else{ attempts++ if(tried==2){totl++ document.forms[0].total.value=totl } if(ans>.95*K & ans<1.05*K ){ document.forms[0].results.value="correct" corrt++ document.forms[0].correct.value=corrt tried=1 } else {document.forms[0].results.value="incorrect" tried=2} }}

Ks for acid-base reactions

This page randomly generates problems involving proton transfer equilibria where all of the species are weak. In order to use the page, you need a table of acid/base Ks. To start,press "New Problem" and a question will appear to the right of the button. Determine the value of the equilibrium constant for the reaction shown, enter it in the cell and press "Check Answer". Results appear in the table.
Enter your answer
Results Total Done Total Correct

Hosted by www.Geocities.ws

1