This class involves one big project, broken into major and minor pieces to help students make steady process through the course of the semester.
| n | represents the number of the work being reassembled | |
| m | represents the line number | |
| wordl<n> | represents the sequence of words in the concordance line | |
| # | marks the central word of the concordance line. The other words provide the context. |
Every word in the work has its own line in the concordance.
For instance, the line "Rats live on no evil star" might appear as
The concordance lines correspond to words in the work, i.e. to reconstruct the work you just need to print out the marked words and a new line when the line number changes. There will be two words of context for every word, except of course, near the front and the end of the line.
The sample simple concordance should produce:
Work 100000
100000:nine times six is forty-two
The normal concordance lines are the same lines as with the simple concordance, except they are randomly sorted. Your program should produce the same results as in Lab 1.
The extreme concordance lines are similar to those of the normal concordance, except that much of the context on each line is removed. No lines were deleted. Your program should produce the same results as with Lab 1 and 2.
Polynomials will use addition, subtraction, and multiplication, along with signed numbers and the variable 'x'. It also uses juxtaposition to reflect implied multiplication. For instance, "2x", actually represents "2 * x".
When you display polynomials, you will use the exponentiation operator, '^'. For instance, "3x^2" actually represents "3 * x * x."
Input a polynomial expression, simplify it, and print it. For instance
| x-x+x*x-x*x | becomes | 0 |
| (x+1)*(x-1) | becomes | x^2 -1 |
| 1+x -2*(x +1 ) +5 *(+5x) + x*x | becomes | x^2 +24x -1 |
| x*x + x^2 - x**2 + -2 - +2 +x * x +x +x +1 +3 | becomes | 2x^2 +2x |
Input an expression, differentiate it, simplify it, and print it
The rules for differentiation you'll need are:
| Rule of Sums | (f(x) + g(x))' | becomes | f'(x) + g'(x) |
| Product Rule | (f(x)*g(x))' | becomes | f(x)*g'(x) + f'(x)*g(x) |
| Just x Rule | x' | becomes | 1 |
| Exponent Rule | (x^n)' | becomes | nx^(n-1) |
| Constant Rule | (any constant)' | becomes | 0 |
Input an extreme concordance, re-assemble the underlying expression, differentiate it, and print it
For instance, the differentiating the sample formula concordance should produce: