In this exercise the issue is that the instructions may be a bit misleading, for our coding habits. The instructions ask to...
Define the bin edges by creating a list between 40000 usd and 16000 usd with steps of 10000 usd
It misses a '0' on '16000'. It should be '160000'.
To create a list between 40000 and 160000 with steps of 10000, some would use list(range(40000, 160001, 10000)), so it includes '40000' and '160000' as first and last element of the list.
However, to pass the asserts you must use list(range(40000, 160000, 10000)), excluding '160000'.
In this exercise the issue is that the instructions may be a bit misleading, for our coding habits. The instructions ask to...
Define the bin edges by creating a list between 40000 usd and 16000 usd with steps of 10000 usd
It misses a '0' on '16000'. It should be '160000'.
To create a list between 40000 and 160000 with steps of 10000, some would use
list(range(40000, 160001, 10000))
, so it includes '40000' and '160000' as first and last element of the list. However, to pass the asserts you must uselist(range(40000, 160000, 10000))
, excluding '160000'.