Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed visible instructor text #234

Merged
merged 2 commits into from
Aug 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 9 additions & 31 deletions pretext/UnitTesting/WritingUnitTests.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -162,52 +162,30 @@ assert grade(92) == 'A'
assert grade(85) == 'B'
assert grade(69) == 'F'
</input></program>
.. reveal:: ac_grade_unittest_aux_reveal
bnmnetp marked this conversation as resolved.
Show resolved Hide resolved
:instructoronly:
.. actex:: ac_grade_unittest_aux

<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 &gt; 100 or score &lt; 0:
if score > 100 or score < 0:
illegal = True
return ''
elif score &gt;= 90:
elif score >= 90:
testA = True
return 'A'
elif score &gt;= 80:
elif score >= 80:
testB = True
return 'B'
else:
testF = True
return 'F'

<p>The following asserts are just some of several that could have been used.</p>


<!--.. 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>
</solution>
</exercise>
</subsection>
Expand Down