class ALEKS_HELP(): def __init__(self): pass; def mailbox(self, boxNum, rectDim, cylDim, shareDim, halfCyl=True): """Calculates square units of materials needed for an amount of mailboxes. BOXNUM is how many mailboxes will be made. RECTDIM: a tuple containing dimensions of each side of a rectangualr prism in form [x, y]: ([Front/Back], [Left/Right]) CYLDIM: a tuple containing dimensions (r, h) of cylinder SHAREDIM: the dimension that both the rectangular prism and the cylinder share HALFCYL: True if a half-cylinder, False otherwise.""" self.SA_rect = 2*(rectDim[0][0]*rectDim[0][1])+2*(rectDim[1][0]*rectDim[1][1])+(rectDim[0][0]*rectDim[1][0]); self.SA_cyl = 2*3.14*cylDim[0]**2+2*3.14*cylDim[0]*cylDim[1]; if halfCyl: self.SA_cyl = self.SA_cyl/2; else: pass;
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question