+ 1

How to use hexadecimal values as string in python.

I was making "Argus Mei's quiz XIX" in python language.I used hexadecimal values as string. Code works well in other python compilers but it don't work in sololearn's python compiler. Please give suggestions so that I can fix it soon. I used Pydroid Compiler for it. ☺☺☺ https://www.sololearn.com/discuss/344620/?ref=app https://code.sololearn.com/cQamIYku58n7/?ref=app

4th May 2017, 11:20 AM
Kshitiz Arya
Kshitiz Arya - avatar
3 ответов
+ 6
Sololearn uses Python3 syntax. You have to use print() as a method not a statement. Please wrap your printed content - str(...) - in a pair of parentheses. Also, you are trying to get the modulo from a string. The variable you assign user input to, should be converted to int (may be in the same line 12). Then it works perfectly :)
4th May 2017, 1:14 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 1
Problem solved. Thanks for helping.
4th May 2017, 2:39 PM
Kshitiz Arya
Kshitiz Arya - avatar
0
Thanks Kuba for your suggestion :)
4th May 2017, 2:40 PM
Kshitiz Arya
Kshitiz Arya - avatar