4/14 alternatives


#1

instead of printing each binary in it’s own line can’t we use range? i tried it didn’t work maybe my code was wrong?

print range(bin(2,6))


#2

looking at the documentation:

https://docs.python.org/2/library/functions.html#bin

we see bin only has a single parameter. So it can only take a single argument, you could use range with a for loop, that is possible. (not sure the exercise will accept it, but you can try)


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.