Last active
June 6, 2018 08:29
-
-
Save thomwolf/3cc1ed223370d09d5c9d683076bcc030 to your computer and use it in GitHub Desktop.
A simple Python Rectangle class
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
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