Skip to content

Instantly share code, notes, and snippets.

@edenizk
Created May 11, 2018 17:07
Show Gist options
  • Save edenizk/2063fae71bcfc4f638403878aabb6102 to your computer and use it in GitHub Desktop.
Save edenizk/2063fae71bcfc4f638403878aabb6102 to your computer and use it in GitHub Desktop.
toruscal calculator
import math
print('TOrus calculator\n')
R=float(input('major radius R = '))
r=float(input('minor radius r = '))
area = (2*math.pi*R)*(2*math.pi*r)
vol = (math.pi*r**2)*(2*math.pi*R)
print("area = ",area)
print("volume = ",vol)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment