26 lines
690 B
XML
26 lines
690 B
XML
<problem display_name="Exercise: apply to each 3" markdown="null" weight="5.0">
|
|
<text>
|
|
<p>
|
|
<b>ESTIMATED TIME TO COMPLETE: 4 minutes</b>
|
|
</p>
|
|
<pre>
|
|
>>> print testList
|
|
[1, 16, 64, 81]
|
|
</pre>
|
|
</text>
|
|
<coderesponse queuename="Watcher-MITx-6.00x">
|
|
<textbox rows="10" cols="80" mode="python" tabsize="4"/>
|
|
<codeparam>
|
|
<initial_display>
|
|
# Your Code Here
|
|
</initial_display>
|
|
<answer_display>
|
|
def square(a):
|
|
return a * a
|
|
applyToEach(testList, square)
|
|
</answer_display>
|
|
<grader_payload>{"grader": "finger_exercises/L6/applyToEach3/grade_ate3.py"}</grader_payload>
|
|
</codeparam>
|
|
</coderesponse>
|
|
</problem>
|