Closed edsml-cc8915 closed 1 year ago
Hi @edsml-8b751625, thank you for raising this issue. Could you please let us know what your solution is? We think that you should make your assert
tests pass since they are testing the output of your code.
And what is the assert statement that is failing?
Sure, this is my solution :)
def odd_numbers(n): odd_num = [] i = 1 while i%2 != 0 and i <= n: odd_num.append(i) i = i + 2 print(odd_num)
It is giving me correct output
This is the assert error:
AssertionError Traceback (most recent call last) Cell In[147], line 5 2 import numpy as np 4 res = odd_numbers(10) ----> 5 assert isinstance(res, list) 6 assert len(res) == 5 7 assert np.allclose(res, [1, 3, 5, 7, 9])
AssertionError:
Please remember that your function must return a value, not only print it.
I just finished solving exercise 1.13 and for the first time see the assert test raise an error while the pybryt test passes. Is my solution wrong or can I rely on the pybryt test alone to assess it?