Last active
December 2, 2015 16:44
-
-
Save Spitfire1900/2588a8e5026c3096f6e1 to your computer and use it in GitHub Desktop.
Print the statistics of a circle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r = int(input("Please enter the radius of a circle: ")) | |
print("Printing statistics of a circle that has a radius of", r, "units.") | |
import math as m | |
a = (m.pi*r)**2 | |
d = r*2 | |
c = 2*(m.pi)*r | |
print("Radius:", r, "units") | |
print("Diameter:", d, "units") | |
print("Circumfurence:", c, "units") | |
print("Area:", a, "square units") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment