sujet
This commit is contained in:
13
python/5/c2byte.py
Normal file
13
python/5/c2byte.py
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
r = ''
|
||||
|
||||
x = ord('a')
|
||||
while ((x/2) != 0):
|
||||
if ((x % 2) == 0):
|
||||
r = r+'0'
|
||||
else:
|
||||
r = r+'1'
|
||||
x = x / 2
|
||||
|
||||
print(c2byte('a'))
|
||||
|
Reference in New Issue
Block a user