PGLabs: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
==PG Labs== | |||
On-line labs for rendering of PG code. These two | On-line labs for rendering of PG code. These two | ||
labs allow you to experiment with PG syntax. | labs allow you to experiment with PG syntax. | ||
=== Test PG code fragments === | |||
http://hosted2.webwork.rochester.edu/webwork2/cervone_course/setAIM-Talk/82/?login_practice_user=true | http://hosted2.webwork.rochester.edu/webwork2/cervone_course/setAIM-Talk/82/?login_practice_user=true | ||
Line 19: | Line 20: | ||
=== Experimental PGML markup lab === | |||
* Experiment with the new PG markup language syntax (PGML)] which simplifies the graphical layout | * Experiment with the new PG markup language syntax (PGML)] which simplifies the graphical layout | ||
of the mathematics question. | of the mathematics question. This is still under development and can't yet be used in standard | ||
PG problems. | |||
http://hosted2.webwork.rochester.edu/webwork2/cervone_course/PGML?login_practice_user=true | http://hosted2.webwork.rochester.edu/webwork2/cervone_course/PGML?login_practice_user=true | ||
[[Category:Authors]] | [[Category:Authors]] |
Revision as of 15:46, 21 June 2008
PG Labs
On-line labs for rendering of PG code. These two labs allow you to experiment with PG syntax.
Test PG code fragments
For example:
Context("Numeric"); $f = Compute("x^2-3x+5"); $fp = $f->D; # calculate the derivative TEXT($fp->cmp->evaluate("2x-3")->pretty_print );
- On the last line
TEXT
prints the results of (reading from left to right)- Constructing the AnswerEvaluator for the contents of the Formula $fp
- Evaluating the string "2x-3" using this AnswerEvaluator to produce an AnswerHash
- Recursively representing the contents of the AnswerHash in a nice table
Experimental PGML markup lab
- Experiment with the new PG markup language syntax (PGML)] which simplifies the graphical layout
of the mathematics question. This is still under development and can't yet be used in standard PG problems.
http://hosted2.webwork.rochester.edu/webwork2/cervone_course/PGML?login_practice_user=true