<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body dir="auto">
<div>Hi</div>
<div>  Sure. </div>
<div>Dad</div>
<div><br>
<br>
Sent from my iPhone</div>
<div><br>
On Jun 1, 2015, at 4:37 PM, Bob Gonzales <<a href="mailto:rgonzal@binghamton.edu">rgonzal@binghamton.edu</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<div dir="ltr">
<div>So, I got another one today.  If you look at 'Script Vars' for partB, an answer was actually calculated for the part.  Here's a cut and paste from the 'Script Vars' windows while viewing the message:</div>
<div><br>
</div>
<div>$ansa=9.54889173779562e+16<br>
$ansb=1.90977834755912e+17<br>
$deg2rad=0.0174532925199433<br>
$f1=6.0221e+23<br>
$f2=2<br>
$mw1=296.41<br>
$n1=0.047<br>
$pi=3.14159265358979<br>
$rad2deg=57.2957795130823<br>
$sub2=oxygen<br>
$t1=2<br>
$t2=3<br>
$unit1=molecules<br>
$uselessVariable=partB</div>
<div><br>
</div>
<div>$ansb is the answer for this part, $f1 is the variable in the denominator that lon-capa is referring to in the message:</div>
<div><br>
</div>
 Illegal division by zero at (eval 88895) line 6.<br>
<br>
occurred while running<br>
<br>
$t2=&random(1,3);<br>
$sub2=&choose($t2,"carbon","hydrogen","oxygen");<br>
$f2=&choose($t2,20.0,24.0,2.0);<br>
$uselessVariable="partB";<br>
$ansb=($ansa/$f1)* $f2 * 6.0221e23;<br>
<br>
<br>
This error occurred while processing part t06p12b<br>
The error occurred on host binghamtona7
<div><br>
</div>
<div>So, I don't know how lon-capa calculated the answer and then complained about an illegal divide by zero.</div>
<div><br>
</div>
<div>Any thoughts?</div>
<div><br>
</div>
<div>Bob Gonzales<br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, May 29, 2015 at 4:37 PM, Bob Gonzales <span dir="ltr">
<<a href="mailto:rgonzal@binghamton.edu" target="_blank">rgonzal@binghamton.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">- The servers are all in the binghamton domain:  <a href="http://loncapa3.chem.binghamton.edu" target="_blank">loncapa3.chem.binghamton.edu</a>, loncapa5,<a href="http://chem.binghamton.edu" target="_blank">chem.binghamton.edu</a>,
<a href="http://loncapa7.chem.binghamton.edu" target="_blank">loncapa7.chem.binghamton.edu</a>.  The machines are not identical machines.  I believe they are 7, 5, 2 years old respectively.  They all have 8 GB or better of memory.  They are all Xenons with
 multiple cores.  They are all running Centos 5.11 and Loncapa  2.10.1.
<div><br>
</div>
<div>- This is occurred for 3 students, 2 other students have gotten it correct.  Many others haven't tried it yet.  <br>
<div><br>
</div>
<div>- We've used this problem before and haven't gotten bombs before.  But, of course, there have been many Centos updates applied since we used it last summer.</div>
<div><br>
</div>
<div>- Setting all the variables in partA would take care of it but I've always done it this way to cut down on the scrolling up and down when creating/editing problems. </div>
<div><br>
</div>
<div>- Clicking 'Script Vars' while viewing the message does show the variable with a value.  </div>
<div><br>
</div>
<div>- I set a useless variable in the first part and changed it's value in the second part per Damien's suggestion,  we will see what happens.   <br>
</div>
<div><br>
</div>
<div>Thanks for all the feedback.  I will keep you posted.</div>
<span class="HOEnZb"><font color="#888888">
<div><br>
<div>Bob</div>
</div>
</font></span></div>
<div class="gmail_extra"><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>LON-CAPA-users mailing list</span><br>
<span><a href="mailto:LON-CAPA-users@mail.lon-capa.org">LON-CAPA-users@mail.lon-capa.org</a></span><br>
<span><a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a></span><br>
</div>
</blockquote>
</body>
</html>