print 'This is school helper/cheat program v1.0.' print 'If you want to find the area of a triangle type "33" ' print 'If you want to find the area of a quadrilateral type "44" ' print 'If you want to find the area of a pentagon type "55" ' print 'If you want to find the area of a hexagon type "66" ' print 'If you want to find the area of a septagon type "77" ' print 'If you want to find the area of an octagon type "88" ' print 'If you want to find the area of a nonagon type "99" ' print 'If you want to find the area of a decagon type "100" ' print 'If you want to find the area of a circle type "110" ' print 'If you want to multiply 2 numbers type "120" ' print 'If you want to divide 2 numbers type "130" ' print 'If you want to find the volume of a cube type "140" ' print 'If you want to find the volume of a triangular prism type "150" ' print 'If you want to add two numbers type "160" ' print 'If you want to subtract two numbers type "170" ' # get type of object and height/base parameters A = int(raw_input("Enter number: ")) if A == 33: N1 = int(raw_input("Height: ")) N2 = int(raw_input("Base: ")) print (N1*N2)/2.0 elif A == 44: N3 = int(raw_input("Enter number: ")) N4 = int(raw_input("Enter number: ")) print N3*N4 elif A == 55: N5 = int(raw_input("Enter number: ")) N6 = int(raw_input("Enter number: ")) N7 = N5/2.0 N8 = N6*N7 N9 = N8/2.0 N10 = N9*5.0 print N10 elif A == 66: N11 = int(raw_input("Enter number: ")) N12 = int(raw_input("Enter number: ")) N13 = N11/2.0 N14 = N13*N12 N15 = N14/2.0 N16 = N15*6.0 print N16 elif A == 77: N17 = int(raw_input("Enter number: ")) N18 = int(raw_input("Enter number: ")) N19 = N17/2.0 N20 = N19*N18 N21 = N20/2.0 N22 = N21*7 print N22 elif A == 88: B = int(raw_input("Enter number: ")) B2 = int(raw_input("Enter number: ")) B3 = B/2.0 B4 = B3*B2 B5 = B4/2.0 B6 = B5*8.0 print B6 elif A == 99: B7 = int(raw_input("Enter number: ")) B8 = int(raw_input("Enter number: ")) B9 = B7/2.0 B10 = B9*B8 B11 = B10/2.0 B12 = B11*9.0 print B12 elif A == 100: B13 = int(raw_input("Enter number: ")) B14 = int(raw_input("Enter number: ")) B15 = B13/2.0 B16 = B15*B14 B17 = B16/2.0 B18 = B17*10.0 print B18 elif A == 110: r = int(raw_input("Enter number: ")) print (3.14159265358979323846264338327950288419716939937520974944592397816)*(r**2) elif A == 120: B19 = int(raw_input("Enter number: ")) B20 = int(raw_input("Enter number: ")) print B19*B20 elif A == 130: B21 = int(raw_input("Enter number: ")) B22 = int(raw_input("Enter number: ")) print B21/B22 elif A == 140: Z = int(raw_input("Enter number: ")) Z1 = int(raw_input("Enter number: ")) Z2 = int(raw_input("Enter number: ")) print Z*Z1*Z2 elif A == 150: ASD = int(raw_input("Enter number: ")) ASD2 = int(raw_input("Enter number: ")) ASD3 = int(raw_input("Enter number: ")) ASD4 = ASD*ASD2 ASD5 = ASD4/2.0 ASD6 = ASD5*ASD3 print ASD6 elif A == 160: Z3 = int(raw_input("Enter number: ")) Z4 = int(raw_input("Enter number: ")) Z5 = Z4+Z3 print Z5 elif A == 170: Z6 = int(raw_input("Enter number: ")) Z7 = int(raw_input("Enter number: ")) print Z5-Z6
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