+ 12
[ASSIGNMENT] 🚩🚩 Convert To Binary
Task:👋👋 Take a number as an input. Convert it to binary. You can use built-in method to perform this task. You can use any language. Good luck😉😉 https://code.sololearn.com/cB6zZ5emKJX0/?ref=app
14 Answers
+ 5
Can easily convert floats as well.
https://code.sololearn.com/coLY4m0wPfvW/?ref=app
+ 21
https://code.sololearn.com/chxRsKef9Z0Z/?ref=app
+ 4
num = int(input("enter a number: "))
print(bin(num))
--python
+ 4
Python (I think this is my first oneliner)
print(bin(int(input())))
+ 1
https://code.sololearn.com/c5bz42khAgc6/?ref=app
This code was by James. It is just something I had saved to study.
+ 1
One liner with python
https://code.sololearn.com/cON6doRCAqfA/?ref=app
- 2
Not just binary, but all bases
https://code.sololearn.com/cOBg9HhtKh9g/?ref=app