Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- def archimedes (sides):
- innerangleB = 360.0 / sides
- halfangleA = innerangleB / 2
- onehalfsideS = math.sin(math.radians(halfangleA))
- sideS = onehalfsideS * 2
- polygonCircumference = sides * sideS
- polygonCircumference = sides * sideS
- pi = polygonCircumference/2
- return pi
- ...and here are the errors:
- >>> import math
- >>>
- >>> def archimedes (sides):
- ...
- File "<stdin>", line 2
- ^
- IndentationError: expected an indented block
- >>> innerangleB = 360.0 / sides
- File "<stdin>", line 1
- innerangleB = 360.0 / sides
- ^
- IndentationError: unexpected indent
- >>> halfangleA = innerangleB / 2
- File "<stdin>", line 1
- halfangleA = innerangleB / 2
- ^
- IndentationError: unexpected indent
- >>>
- >>> onehalfsideS = math.sin(math.radians(halfangleA))
- File "<stdin>", line 1
- onehalfsideS = math.sin(math.radians(halfangleA))
- ^
- IndentationError: unexpected indent
- >>>
- >>> sideS = onehalfsideS * 2
- File "<stdin>", line 1
- sideS = onehalfsideS * 2
- ^
- IndentationError: unexpected indent
- >>>
- >>> polygonCircumference = sides * sideS
- File "<stdin>", line 1
- polygonCircumference = sides * sideS
- ^
- IndentationError: unexpected indent
- >>>
- >>> polygonCircumference = sides * sideS
- File "<stdin>", line 1
- polygonCircumference = sides * sideS
- ^
- IndentationError: unexpected indent
- >>> pi = polygonCircumference/2
- File "<stdin>", line 1
- pi = polygonCircumference/2
- ^
- IndentationError: unexpected indent
- >>>
- ... return pi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement