{VERSION 6 0 "IBM INTEL NT" "6.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 1 12 255 0 0 1 2 1 2 2 1 2 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Courier" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE " No Name" -1 205 1 {CSTYLE "" -1 -1 "Courier" 1 12 255 0 0 1 2 2 2 2 1 2 1 1 1 1 }1 1 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE "No Name" -1 206 1 {CSTYLE "" -1 -1 "Courier" 1 12 255 0 0 1 2 2 2 2 1 2 1 1 1 1 }1 1 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE "No Name" -1 207 1 {CSTYLE "" -1 -1 "Co urier" 1 12 255 0 0 1 2 2 2 2 1 2 1 1 1 1 }1 1 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE "No Name" -1 208 1 {CSTYLE "" -1 -1 "Courier" 1 12 255 0 0 1 2 2 2 2 1 2 1 1 1 1 }1 1 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE "No Name" -1 209 1 {CSTYLE "" -1 -1 "Courier" 1 12 255 0 0 1 2 2 2 2 1 2 1 1 1 1 }1 1 0 0 0 0 2 0 2 0 2 2 0 1 }{PSTYLE "No Name" -1 210 1 {CSTYLE "" -1 -1 "Courier" 1 12 255 0 0 1 2 2 2 2 1 2 1 1 1 1 }1 1 0 0 0 0 2 0 2 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 89 "with(Maplets): with(Maplets[Tools]) : with(Maplets[Elements]): with(plots):\nStartEngine();" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1987 "TrigFuncs:=Maplet(onstartup = Run Window(MAIN),\nWindow[MAIN]('title'=\"Trigonometric Functions\",\n [ \+ halign=none,\n [ Button(\"New Triangle\", Evaluate('function' = \"a sk\")),\n HorizontalGlue(),\n Button(\"Quit\", Shutdown())\n ],\n [ valign=none,\n [ [ \"Consider the triangle with ver tices:\",\n HorizontalGlue()\n ],\n TextBox['qu estion']('width'=40, 'editable'='false'),\n VerticalGlue()\n \+ ],\n HorizontalGlue(),\n Plotter['PL'](plot(0,view=[0..10 ,0..10], color=black), width=200,height=200),\n HorizontalGlue() \n ],\n [ \"Compute each of the following:\",\n HorizontalG lue()\n ],\n [ [ [ \"sin(A)= \", \n TextField['sinA'](' width'=10),\n Button(\"Check\", Evaluate(function=\"check1\") ),\n Button(\"Show\", Evaluate(function=\"ans1\"))\n ] ,\n [ \"tan(A)= \",\n TextField['tanA']('width'=10),\n Button(\"Check\", Evaluate(function=\"check3\")),\n \+ Button(\"Show\", Evaluate(function=\"ans3\"))\n ],\n [ \+ \"sec(A)= \",\n TextField['secA']('width'=10),\n But ton(\"Check\", Evaluate(function=\"check5\")),\n Button(\"Sho w\", Evaluate(function=\"ans5\"))\n ]\n ],\n [ [ \"co s(A)= \",\n TextField['cosA']('width'=10),\n Button( \"Check\", Evaluate(function=\"check2\")),\n Button(\"Show\", Evaluate(function=\"ans2\"))\n ],\n [ \"cot(A)= \",\n \+ TextField['cotA']('width'=10),\n Button(\"Check\", Ev aluate(function=\"check4\")),\n Button(\"Show\", Evaluate(fun ction=\"ans4\"))\n ],\n [ \"csc(A)= \",\n TextF ield['cscA']('width'=10),\n Button(\"Check\", Evaluate(functi on=\"check6\")),\n Button(\"Show\", Evaluate(function=\"ans6 \"))\n ]\n ]\n ],\n [\n Button(\"Check All Answ ers\", Evaluate('function' = \"checkall\"))\n ],\n [ TextField[' reply']('width'=40, 'editable'='false')\n ],\n [ \"Programmers: \+ Duensing & Millican Copyright P. Yasskin 2005\"\n ]\n ]\n)\n):" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 466 "ask:=proc()\nglobal a, b, points,correctsin, correctcos, correcttan, correctcot, correctsec, co rrectcsc;\nlocal c,rand9;\nrand9:=rand(1..9):\na:=rand9();\nb:=rand9() ;\npoints:=[[0,0],[b,0],[b,a],[0,0]];\nc:=sqrt(a^2+b^2);\ncorrectsin:= a/c;\ncorrectcos:=b/c;\ncorrecttan:=a/b;\ncorrectcot:=b/a;\ncorrectsec :=c/b;\ncorrectcsc:=c/a;\nSet('question'= cat(\" A=(0,0), B=(\",b,\",0 ), and C=(\",b,\",\",a,\").\") );\nSet('PL'=plot(points, scaling=const rained, tickmarks=[[0,b],[0,a]]));\nend proc:" }}}{EXCHG {PARA 205 "> \+ " 0 "" {MPLTEXT 1 0 250 "check1:=proc()\nglobal correctsin;\nlocal use rsin;\nusersin:=Get('sinA'::'realcons', corrections=true, update=true) :\nif usersin=correctsin\n then Set('reply'=\"Correct! Try another qu estion.\")\n else Set('reply'=\"Incorrect. Try again.\")\nend if;\nen d proc:" }}}{EXCHG {PARA 206 "> " 0 "" {MPLTEXT 1 0 250 "check2:=proc( )\nglobal correctcos;\nlocal usercos;\nusercos:=Get('cosA'::'realcons' , corrections=true, update=true):\nif usercos=correctcos\n then Set(' reply'=\"Correct! Try another question.\")\n else Set('reply'=\"Incor rect. Try again.\")\nend if;\nend proc:" }}}{EXCHG {PARA 207 "> " 0 " " {MPLTEXT 1 0 250 "check3:=proc()\nglobal correcttan;\nlocal usertan; \nusertan:=Get('tanA'::'realcons', corrections=true, update=true):\nif usertan=correcttan\n then Set('reply'=\"Correct! Try another questio n.\")\n else Set('reply'=\"Incorrect. Try again.\")\nend if;\nend pro c:" }}}{EXCHG {PARA 208 "> " 0 "" {MPLTEXT 1 0 250 "check4:=proc()\ngl obal correctcot;\nlocal usercot;\nusercot:=Get('cotA'::'realcons', cor rections=true, update=true):\nif usercot=correctcot\n then Set('reply '=\"Correct! Try another question.\")\n else Set('reply'=\"Incorrect. Try again.\")\nend if;\nend proc:" }}}{EXCHG {PARA 209 "> " 0 "" {MPLTEXT 1 0 250 "check5:=proc()\nglobal correctsec;\nlocal usersec;\n usersec:=Get('secA'::'realcons', corrections=true, update=true):\nif u sersec=correctsec\n then Set('reply'=\"Correct! Try another question. \")\n else Set('reply'=\"Incorrect. Try again.\")\nend if;\nend proc: " }}}{EXCHG {PARA 210 "> " 0 "" {MPLTEXT 1 0 250 "check6:=proc()\nglob al correctcsc;\nlocal usercsc;\nusercsc:=Get('cscA'::'realcons', corre ctions=true, update=true):\nif usercsc=correctcsc\n then Set('reply'= \"Correct! Try another question.\")\n else Set('reply'=\"Incorrect. T ry again.\")\nend if;\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 794 "checkall:=proc()\nglobal correctsin, correctcos, cor recttan, correctcot, correctsec, correctcsc;\nlocal usersin,usercos,us ertan,usercot,usersec,usercsc;\nusersin:=Get('sinA'::'realcons', corre ctions=true, update=true):\nusercos:=Get('cosA'::'realcons', correctio ns=true, update=true):\nusertan:=Get('tanA'::'realcons', corrections=t rue, update=true):\nusercot:=Get('cotA'::'realcons', corrections=true, update=true):\nusersec:=Get('secA'::'realcons', corrections=true, upd ate=true):\nusercsc:=Get('cscA'::'realcons', corrections=true, update= true):\nif (usersin=correctsin and usercos=correctcos and usertan=corr ecttan and usercot=correctcot and usersec=correctsec and usercsc=corre ctcsc)\n then Set('reply'=\"Correct! Try another question.\")\n else Set('reply'=\"Incorrect. Try again.\")\nend if;\nend proc:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "ans1:=proc()\nglobal correct sin;\nSet(sinA=convert(correctsin,string));\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "ans2:=proc()\nglobal correctcos;\nS et(cosA=convert(correctcos,string));\nend proc:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 79 "ans3:=proc()\nglobal correcttan;\nSet(tanA=con vert(correcttan,string));\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 80 "ans4:=proc()\nglobal correctcot;\nSet(cotA=convert(co rrectcot, string));\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "ans5:=proc()\nglobal correctsec;\nSet(secA=convert(correctsec, string));\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "ans 6:=proc()\nglobal correctcsc;\nSet(cscA=convert(correctcsc,string));\n end proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "Display(TrigFu ncs);" }}}}{MARK "0 0 0" 0 }{VIEWOPTS 1 1 1 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }