This function receives as a parameter an integer and should return a list representing the same value expressed in binary as a list of bits, where the first element in the list is the most significant (leftmost) bit.
My function currently outputs '1011'
for the number 11, I need [1,0,1,1]
instead.
For example,
>>> convert_to_binary(11)
[1,0,1,1]
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…