Skip to content

Commit

Permalink
added commentary tags to WritingUnitTests
Browse files Browse the repository at this point in the history
  • Loading branch information
campbelle2 committed Jul 13, 2022
1 parent 8f46817 commit f6e3fab
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions pretext/UnitTesting/WritingUnitTests.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -163,28 +163,29 @@ assert grade(85) == 'B'
assert grade(69) == 'F'
</input></program>


<!--.. reveal:: ac_grade_unittest_aux_reveal-->
<!--:instructoronly:-->
<!--.. actex:: ac_grade_unittest_aux-->
<!--testA = False-->
<!--testB = False-->
<!--testF = False-->
<!--illegal = False-->
<!--def grade(score):-->
<!--global illegal, testA, testB, testF-->
<!--if score > 100 or score < 0:-->
<!--illegal = True-->
<!--return ''-->
<!--elif score >= 90:-->
<!--testA = True-->
<!--return 'A'-->
<!--elif score >= 80:-->
<!--testB = True-->
<!--return 'B'-->
<!--else:-->
<!--testF = True-->
<!--return 'F'-->
<commentary>
ac_grade_unittest_aux_reveal
instructoronly
actex:: ac_grade_unittest_aux
testA = False
testB = False
testF = False
illegal = False
def grade(score):
global illegal, testA, testB, testF
if score > 100 or score < 0:
illegal = True
return ''
elif score >= 90:
testA = True
return 'A'
elif score >= 80:
testB = True
return 'B'
else:
testF = True
return 'F'
</commentary>
</solution>
</exercise>
</subsection>
Expand Down

0 comments on commit f6e3fab

Please sign in to comment.