Checkpoint 5.4.1. Inline Coding Exercise, No Help.
View Source for exercise
<exercise label="coding-exercise-blank">
<title>Inline Coding Exercise, No Help</title>
<statement>
<p>An exercise might ask a reader to write a computer program, that would go here in the <tag>statement</tag>. But you can also add a <tag>program</tag> element after a <tag>statement</tag>. Here we place no code at all, but we do say we want it to be interactive. The purpose is to make it a live coding environment for a version of your output that allows the reader to perhaps submit a solution. The <tag>program</tag> element is necessary so you can specify a programming language.</p>
<p>In interactive formats, try creating and running a Python program below. Use CodeLens to step through the program.</p>
</statement>
<program interactive="activecode" language="python" />
<hint><p>We didn't really ask you to do anything.</p></hint>
</exercise>
An exercise might ask a reader to write a computer program, that would go here in the
<statement>
. But you can also add a <program>
element after a <statement>
. Here we place no code at all, but we do say we want it to be interactive. The purpose is to make it a live coding environment for a version of your output that allows the reader to perhaps submit a solution. The <program>
element is necessary so you can specify a programming language.In interactive formats, try creating and running a Python program below. Use CodeLens to step through the program.
Hint.
We didnβt really ask you to do anything.