Older Version Newer Version

cogburn cogburn May 23, 2012

**Monatomic Ions Practice**

Students will be the ones who benefit from the use of this program to memorize the common monatomic ions, symbols, and charges.
[[code format="lb"]]
'Some common monatomic ion symbols and charges practice program
'version 1.0
'by Scott Ausbrooks
'May, 2012
'some .wav files have been remmed out- feel free to replace them with
'your own buzzers and bells (it gets annoying after a short while)
 nomainwin

 WindowWidth = 640
 WindowHeight = 360
 UpperLeftX = int((DisplayWidth-WindowWidth)/2)
 UpperLeftY = int((DisplayHeight-WindowHeight)/2)
 'playwave "startup.wav",sync
 graphicbox #w.g, 10, 10, 600, 200
 statictext #w.s, "Enter the symbol and charge of the ion (no spaces)", 10, 288, 400, 30
 textbox #w.tb1, 10, 240, 200, 32
 textbox #w.tb2, 20,25,580,180
 button #w.b1, "Check", [entered], LR, 300, 45, 60, 30
 button #w.b2, "Next Ion", [continue], LR, 200,45,60,30
 button #w.b3,"Score",[score],LR, 100,45,60,30
 open "Monatomic Ion Practice" for window as #w
 #w, "trapclose [quit]"
 #w.tb1 "!font arial 16 bold"
 #w.s "!font arial 12"
 #w.tb2 "!font arial 60 bold"
 #w.tb1 "!setfocus"
 correct = 0
 count = 0
 for j = 1 to 28
 #w.tb1,""
 #w.tb2, ""
 #w.tb1 "!setfocus"
 read name$, sycharge$
 #w.tb2, name$
 wait
 [entered]
 #w.tb1 "!contents? reply$"
 if reply$ = sycharge$ then
 #w.tb2, "Correct!"
 'playwave "hallelujah.wav",sync
 'playwave "beep.wav",async
 correct = correct + 1
 count = count + 1
 else
 #w.tb2, "STUDY MORE"
 'playwave "madcow.wav",sync
 'playwave "tpirbuzz.wav",sync
 correct = correct
 count = count + 1
 end if

wait
 [continue]

 next j

 wait
 data "lithium", "Li+1", "copper (II)", "Cu+2", "phosphide", "P-3", "aluminum", "Al+3","barium","Ba+2"
 data "bromide","Br-1","iron (III)","Fe+3","magnesium","Mg+2","nitride","N-3","chloride","Cl-1"
 data "tin(IV)","Sn+4","zinc","Zn+2","calcium","Ca+2","sodium","Na+1","copper(I)","Cu+1","lead(IV)","Pb+4"
 data "mercury(I)","Hg+1","sulfide","S-2","silver","Ag+1","tin(II)","Sn+2","iron(II)","Fe+2","cobalt(II)","Co+2"
 data "oxide","O-2","fluoride","F-1","cadmium","Cd+2","iodide","I-1","lead(II)","Pb+2","nickel(II)"
 data "Ni+2","end",0
[score]
 percent = (correct/count) * 100
 rounded = int(percent*10^2 +0.5) / 10^2
 #w.tb2, rounded;" % right"
 wait
 [quit]
 close #w
end


[[code]]