Created
May 15, 2020 04:03
-
-
Save chicagowebmanagement/6b0e9f4b09f28e4f08b131d218881769 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
class Hexagon: | |
def __init__ (self, side): | |
self.perimeter = (side*6) | |
self.side = side | |
hex1 = Hexagon(16) | |
print (hex1.perimeter) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
original code was not working, so this is simpler version
#original code below
import math
class Hexagon():
def init (self, s):
self.side = s
hex1 = Hexagon(6)
print (hex1.calculate_perimeter)