+ 3

Can you make it work 2?

i want to write my name, and the orogram should give me it in binary https://code.sololearn.com/cYvnlPdpwF39/?ref=app

29th May 2018, 7:06 PM
misgav yosef
misgav yosef - avatar
9 Antworten
+ 2
I'm Sorry for not useful question. But why do you need binary text? :-) print("\u0420\u043e\u0441\u0441\u0438\u044f") My Country's name ;-) text="Россия" for i in text: print(i,'-',hex(ord(i))) Unicode is not binary, it is hexadecimal... As you wish it can be in binary: text="Россия" for i in text: print(i,'-',bin(ord(i)))
31st May 2018, 2:38 PM
dimon2101
dimon2101 - avatar
+ 4
a. this code is one of my ways to practice files. b. what about the binary?
29th May 2018, 8:31 PM
misgav yosef
misgav yosef - avatar
+ 4
DIMON2101 because it's cool. and im sorry if this question is too much, but there is still a problem https://code.sololearn.com/cqIuITSQ9473/?ref=app
31st May 2018, 3:32 PM
misgav yosef
misgav yosef - avatar
+ 3
thanks
31st May 2018, 3:46 PM
misgav yosef
misgav yosef - avatar
+ 3
my name is Misgav Yosef and check the link, is should be in a binary code the letter "b"?
31st May 2018, 3:54 PM
misgav yosef
misgav yosef - avatar
+ 2
First, I would recommend to use for development no files first, just ask for input and print it after
29th May 2018, 8:04 PM
Jonas Schröter
Jonas Schröter - avatar
+ 2
It worx well: x =input('Enter some text: ') print() for i in x: print(i,'-',bin(ord(i)))
31st May 2018, 3:43 PM
dimon2101
dimon2101 - avatar
+ 2
I can not understand how your name sounds... So good luck, man ))))))))
31st May 2018, 3:48 PM
dimon2101
dimon2101 - avatar
+ 2
Yes, of course, Misgav Yosef! So it can be removed: print(YourTextVariable[2::])
31st May 2018, 4:16 PM
dimon2101
dimon2101 - avatar