|
home—lects—hws
D2L—breeze (snow day)
For this homework, you'll submit three files:
As in lecture,
silly-page.php should start with “
Notes:
The following two problems are not due yet — they will be on the next homework.
However, you can start on them earlier if you like. Note that
Note that this is just a regular ol' function that takes in strings and returns strings!
The fact that the strings happen to have angle-brackets in them means that the result might
be useful to people generating html, but the function itself does't really care.
(You don't need to come up with additional test cases, but you do need to actually include these tests or their equivalent. You can assume that neither string is ever empty.)
Note how the input strings don't contain any quote-characters, but the returned result does (since HTML attributes must be quoted). I recommend that your generated html uses single quote marks around attributes, but you'll get full credit for either single- or double-quote marks, as long as it is valid HTML. Make sure your test case(s) express exactly what you want the desired output should be!
Make a test-case for
You don't need further test-cases for this problem.
Pay close attention to the exact spacing you want to have.
I recommend using single-quotes (
For full credit, your function should call
1
You may have seen in Web I that text not enclosed
in
home—lects—hws
D2L—breeze (snow day)
©2013, Ian Barland, Radford University Last modified 2014.Jan.31 (Fri) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |