Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Function does not give good result
-
Hi forum:
I need help to understand what is happening that the function does not give a good result.
Thanks.import ui suma = 0 suma1 = 0 class Arithmetic(): pass a = input("Vamos a Sumar. :") type(suma) def math_ope(a): return 2*a resultado = math_ope(a) print(resultado) a = 0
-
@sendog3c,
input
returns a string. Convert the value withint()
orfloat()
before giving it to your function. -
It works. Thank you very much