0
The problem is in:
raio = input("Informe o raio: ")
This is because you are not defining the variable type (int,str,float,bool) input will receive. By default python input will always receive a String which has its type defined as str or is not receiving a numerical value.
- So the python is trying to raise to 2 a String and not a int is a numerical value That’s why you’re making a mistake.
To solve just define the type of input as follows:
raio = int(input("Informe o raio: "))
Or if you want to use a floating point number (Broken numbers):
raio = float(input("Informe o raio: "))
I hope I’ve helped!
Good evening! Don’t put your code as an image, people need to play your code quickly!
– lmonferrari
Yeah, you’re right, I hadn’t thought of that. Thanks for the tip, good night!
– Squid28