I was attempting a question on edabit (https://edabit.com/challenge/4t6YAJS8dtT7RQjta), for which I got this answer:
def num_layers(no):
paper_size = 0.0005
if no == 1:
paper_size = paper_size * 2
else:
paper_size = 1
paper_size = paper_size * (2 ** (no-1))
return (str(paper_size / 1000) + 'm')
Though it says that the test was passed, I still receive this error:
FAILED: '1e-06m' should equal '0.001m'
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: '1e-06m' should equal '0.001m'
How can I add meters to my answer without it returning this error?