Number representation in python | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Number representation in python

https://code.sololearn.com/cluLI1bR8Qt1/?ref=app Please look into the code and explain why 3rd line is throwing Error.

13th Jun 2018, 4:35 AM
ankush_953
2 ответов
0
I understand that putting 0b will make it binary number. similar changes will take place with 0o and 0x. but what I want to know that why my code doesn't work the way I want ? Why explicit declaration is needed ?
13th Jun 2018, 5:17 AM
ankush_953
0
Okay. So Can I conclude that this is the rule and there is no logic behind it ?
13th Jun 2018, 5:48 AM
ankush_953