small improvements
This commit is contained in:
@@ -46,7 +46,7 @@ def grade(user_input, correct_answer):
|
|||||||
if use_targets is True:
|
if use_targets is True:
|
||||||
{'1': 't1', 'name_with_icon': 't2'}
|
{'1': 't1', 'name_with_icon': 't2'}
|
||||||
else:
|
else:
|
||||||
{'1': '(10, 10)', 'name_with_icon': '[(10, 10), 20]'}
|
{'1': '[10, 10]', 'name_with_icon': '[[10, 10], 20]'}
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
True or False.
|
True or False.
|
||||||
@@ -68,8 +68,7 @@ def grade(user_input, correct_answer):
|
|||||||
|
|
||||||
Returns: bool.
|
Returns: bool.
|
||||||
"""
|
"""
|
||||||
if not isinstance(correct_answer, list) or \
|
if not isinstance(correct_answer, list) or isinstance(user_answer, list):
|
||||||
not isinstance(user_answer, list):
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
r = 10
|
r = 10
|
||||||
|
|||||||
Reference in New Issue
Block a user