[CHM 330] Common mistake...
Andrew J. Pounds
pounds_aj at mercer.edu
Thu Nov 2 07:38:43 EDT 2023
One common mistake I have seen at least twice now on the project relates
to when you modify the code to produce the graphs. When you add
if ( t >= 0.5 and t < 0.5+h):
rate = -(sArray[len(sArray)-1] - sArray[len(sArray)-2]) / h
print (str(t) + " " + str(rate))
to your code you need to make sure that you use SPACES (from the
spacebar) and not TABS to indent. Python interprets tabs and spaces
differently and indentation is what is used to structure the control
structures in python programs. That means that the "i" in "if" needs
to be directly under and in the same column as the first "e" in "esArray
= np.append(esArray,[es])" from the previous line.
If you make these changes and still don't get the printed time/rate
information, please contact me. I would really like to get all of this
resolved before class tomorrow.
--
*/Andrew J. Pounds, Ph.D./*
/Professor of Chemistry and Computer Science/
/Director of the Computational Science Program/
/Mercer University, Macon, GA 31207 (478) 301-5627/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/chm330/attachments/20231102/66028124/attachment.html>
More information about the chm330
mailing list