Python 3.x 在编码挑战网站Edabit上,我不断地得到错误:回溯不确定该做什么

Python 3.x 在编码挑战网站Edabit上,我不断地得到错误:回溯不确定该做什么,python-3.x,traceback,Python 3.x,Traceback,例如,在这段代码中,我得到了一个错误:Traceback def verify_substrs(main_txt, head, body, tail): full = head + body + tail if main_txt == full: return "My head, body, and tail." else: return "Incomplete" 失败:“不完整”应等于“不完整” 错误:回溯: 在里面 文件“/frameworks/python/c

例如,在这段代码中,我得到了一个错误:Traceback

      def verify_substrs(main_txt, head, body, tail):
full = head + body + tail
if main_txt == full:
    return "My head, body, and tail."
else:
    return "Incomplete"
失败:“不完整”应等于“不完整”
错误:回溯:
在里面
文件“/frameworks/python/cw-2.py”,第28行,在assert_equals中
预期(实际==预期,消息,允许上升)
expect中第18行的文件“/frameworks/python/cw-2.py”
引发资产异常(消息)
cw-2.AssertException:“不完整”应等于“不完整”。
我非常感谢您的帮助,因为对我来说,代码应该可以正常工作

失败:“不完整”应等于“不完整”


它希望“不完整”。结尾有一个句号。

看起来该网站在错误答案的情况下会抛出错误。这很奇怪,因为错误的输出与错误不同。无论如何,您在
“complete”
末尾缺少了一个
(点)。看看这是否能解决问题。谢谢你,它确实解决了,也谢谢你解释说回溯意味着我搞砸了。错误意味着你搞砸了。追溯是对混乱的一种解释。
FAILED: 'Incomplete' should equal 'Incomplete.'

ERROR: Traceback:
   in <module>

  File "./frameworks/python/cw-2.py", line 28, in assert_equals
    expect(actual == expected, message, allow_raise)
  File "./frameworks/python/cw-2.py", line 18, in expect
    raise AssertException(message)
cw-2.AssertException: 'Incomplete' should equal 'Incomplete.