+ 1
Why does the PI number not work
9 Réponses
+ 3
Hey Дмитрий Васильев you will have to import math to use its method
+ 3
The math module is the one that contains the PI variable.
The math module is not directly present in the present directory unless you import it directly. That's where the statement
import math
comes. Alternatively, you can cut some slack by copying this:
pi = 3.1415926535
+ 3
Take help from here: https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2438/
Hope it helps
+ 2
At the very top do:
Import math or from math import pi
+ 2
Whats the problem its working
+ 2
This is case sensitive
So, you have to enter 'PI number' not 'pi number' or change in condition.
+ 2
Have you solved your problem
+ 2
Yes
+ 1
I do not understand. Please explain in more detail