Answers for "getting pi in python"

16

python floor

import math
x = 3.86356
math.floor(x)
#Returns: 3
math.ceil(x)
#Returns: 4
Posted by: Guest on May-18-2020
1

getting pi in python

import math

print('The value of pi is: ', math.pi)
Posted by: Guest on August-09-2021
3

pi python

# import built in math module
import math

# Showing usage of pi function
print(math.pi)
Posted by: Guest on June-03-2020

Python Answers by Framework

Browse Popular Code Answers by Language