4/14 alternatives


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))


looking at the documentation:


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)


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