![]() | Physics and Astronomy |
Back to top
Computational Physics Week 2: Course workUse of Comments[30%] Do this part in pairs, hand in one piece of work per pair.
First ask yourselves:
Now write A brief answer (bullet points, etc. are fine) to the question: how are comments going to help you program, not hinder you?Remember: if you use sources, reference them. Quadratic equations[70%] Do this on your own.Define a suitable structure to hold the coefficients of a quadratic equation and write a simple program to read in theses values and to call a function to calculate the solutions(s) and print them out. Allow for all possible cases, including where it's not really a quadratic at all. |