Merge branch 'master' into kiram15/version

This commit is contained in:
Kira Miller
2022-12-06 11:10:20 -05:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -65,7 +65,7 @@ data: |
if response[0] == 'ac':
for node in response[1:]:
ac_values = node['NodeA']
print "the ac analysis value:", ac_values
print("the ac analysis value:", ac_values)
if ac_values == None:
correct = ['incorrect']
elif ac_values[0][1] < ac_values[1][1]:

View File

@@ -17,7 +17,7 @@ metadata:
\begin{edXscript}
def test_str(expect, ans):
print expect, ans
print(expect, ans)
ans = ans.strip("'")
ans = ans.strip('"')
return expect == ans.lower()
@@ -25,7 +25,7 @@ metadata:
def hint_fn(answer_ids, student_answers, new_cmap, old_cmap):
aid = answer_ids[0]
ans = str(student_answers[aid]).lower()
print 'hint_fn called, ans=', ans
print('hint_fn called, ans=', ans)
hint = ''
if 'java' in ans:
hint = 'that is only good for drinking'
@@ -56,7 +56,7 @@ data: |
<customresponse cfn="test_str" expect="python">
<script type="text/python" system_path="python_lib">
def test_str(expect, ans):
print expect, ans
print(expect, ans)
ans = ans.strip("'")
ans = ans.strip('"')
return expect == ans.lower()
@@ -64,7 +64,7 @@ data: |
def hint_fn(answer_ids, student_answers, new_cmap, old_cmap):
aid = answer_ids[0]
ans = str(student_answers[aid]).lower()
print 'hint_fn called, ans=', ans
print('hint_fn called, ans=', ans)
hint = ''
if 'java' in ans:
hint = 'that is only good for drinking'