Write two ways in which you are able to use constant pi in your programs.
Answer:
Two ways to use constant pi in programs are:
(i)
import math
print(math.pi)
(ii)
from math import pi
print(pi)
Past Year - 1 Mark Questions
Question 2 Important
Question 3
Question 4
Question 5 You are here
Question 6
Question 7 Important
Question 8
Question 9 Important
Question 10 Important
Question 11 Important
Question 12 Important
Question 13
Question 14
Question 15
Question 16
Question 17 Important
Question 18 Important
Question 19 Important
Question 20
Question 21 Important
Question 22
Question 23 Important
Past Year - 1 Mark Questions
Last updated at Dec. 13, 2024 by Teachoo
Answer:
Two ways to use constant pi in programs are:
(i)
import math
print(math.pi)
(ii)
from math import pi
print(pi)