Skip to content

Instantly share code, notes, and snippets.

@Spitfire1900
Last active December 2, 2015 16:44
Show Gist options
  • Save Spitfire1900/2588a8e5026c3096f6e1 to your computer and use it in GitHub Desktop.
Save Spitfire1900/2588a8e5026c3096f6e1 to your computer and use it in GitHub Desktop.
Print the statistics of a circle
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