13 lines
442 B
Python
13 lines
442 B
Python
|
|
# Runestone.Academy thinkcspy course
|
||
|
|
# Chapter 5
|
||
|
|
# Problem 19
|
||
|
|
|
||
|
|
import math
|
||
|
|
|
||
|
|
c = float(input("Today we are going to calculate pi from the dimensions of a circle. What is the circumference of your circle?"))
|
||
|
|
d = float(input("And what is the diameter of your circle?"))
|
||
|
|
|
||
|
|
zpi = c/d
|
||
|
|
|
||
|
|
print("The approximate value of pi from the dimensions provided is", zpi)
|
||
|
|
print("The actual (also technically approximate) value of pi is", math.pi)
|