Skip to content

Instantly share code, notes, and snippets.

@thomwolf
Last active June 6, 2018 08:29
Show Gist options
  • Save thomwolf/3cc1ed223370d09d5c9d683076bcc030 to your computer and use it in GitHub Desktop.
Save thomwolf/3cc1ed223370d09d5c9d683076bcc030 to your computer and use it in GitHub Desktop.
A simple Python Rectangle class
class Rectangle:
def __init__(self, w, h):
self.w = w
self.h = h
def area(self):
return self.w * self.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment