* is not working properly | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

* is not working properly

https://code.sololearn.com/cGnEynbsJ4Cb/?ref=app Im making a cal app, plus and sub is working but times is not working How to fix?

12th Jan 2019, 10:20 AM
prisma
prisma - avatar
1 Answer
+ 5
It seems to be some character encoding issue, and I risk it that it may be specific to the Sololearn code playground... I suggest you use a different symbol instead of "×" for the multiplication (it is not trivial to type this symbol anyway) For example letter x or an asterisk * would work better. If you insist on × then it will work if you change your condition to this: if op == chr(120): print(int(int1) * int(int2))
12th Jan 2019, 10:46 AM
Tibor Santa
Tibor Santa - avatar