print("Il programma calcola il binario di un numero")
bin = ""
ok == false
while ok = false:
n = int(input("Inserisci il numero che vuoi convertire in binario compreso tra 0 e 4096"))
if n>=0 or n<=4096:
ok = true
q = n
while q!=0:
risultato = q%2
n = q//2
bin = str(risultato) + bin
print("bin")
To embed this project on your website, copy the following code and paste it into your website's HTML: