Mathew YangangPython Web Development Techdegree Student 2,896 Points
I keep getting couldn't find get locations errors
import random def get_locations(cells): random.sample(x,y) pass return get_locations() return get_locations() return get_locations()
Dave HarkerPro Student 13,993 Points
Hi Mathew Yangang,
You can only process a single return from a function but I can see what you were trying to achieve there. Since that isn't an option however we can use the random.sample function from Python random, which returns a list.
From the python documentation found here: Python 3 - Random
Return a k length list of unique elements chosen from the population sequence or set. Used for random sampling without replacement.
So with that in mind, you could try something like:
return random.sample(cells, 3)
Keep on coding!
P.S. You can just delete that
pass from the challenge ... not sure why they put that there.