Binary converter

Here we have the code that convert decimal to binary.

Scripter

#decimal to binary converter
print("Write the number to convert to binary: ")
number = int(input())
list = []
i = 0
while(number > 0):
  mod = number % 2
  number = number // 2
  list.insert(0,mod)
print(list)

Test

We introduce an integer number:

Result