DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
binary python
def bin(n): s="" while n!=0: if n%2==1: s+="1" n//=2 elif n%2==0: s+='0' n//=2 return s
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#binary
#python
ADD COMMENT
Topic
COMMENT
Name
6+5 =
Submit