Rewrite demo assignment

This is a proposed implementation of the assignment layout discussed in #67 .

Resolves #67 
You're right — leaving it in the doctest block is a fine way to go.


On Wed, Aug 20, 2014 at 10:44 PM, albert12132 <notifications@github.com>
wrote:

> In client/demo_assignments/hw1/tests/q1.py:
>
> > +      'Domain is strings. Range is strings',
> > +    ],
> > +  },
> > +  {
> > +    'type': 'doctest',
> > +    'test': """
> > +    >>> square(3)
> > +    9
> > +    """,
> > +  },
> > +  {
> > +    'type': 'doctest',
> > +    'test': """
> > +    >>> square(-2)
> > +    4
> > +    # explanation: Squaring a negative number
>
> In that case, we could just move the answers to a separate field as well,
> and just use the $ prompt for tests, since that's how the TestCases are
> represented anyway. The main reason I had it with comments was because
> that's probably more intuitive for students and staff. Having separate
> fields would certainly make it easier for ok.py, though.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Cal-CS-61A-Staff/ok/pull/76/files#r16521462>.
>