Skip to content Skip to sidebar Skip to footer

Unsupported Operand Type(s) For ** Or Pow(): 'str' And 'int'

Thats my code, I don't know why the program gives me that Error.. PD: I'm a beginner in this programming language. import math while True: A=input('Escribe el Valor de la 1ra Varia

Solution 1:

It is failing because input() returns a string. To convert it to an integer, you can use int(some_string).

Solution 2:

Instead of putting input("Escribe el Valor de la 1ra Variable : ")

Put int(input("Escribe el Valor de la 1ra Variable : ")

That converts the input to an integer.

Post a Comment for "Unsupported Operand Type(s) For ** Or Pow(): 'str' And 'int'"