Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
python Class example
class Rectangle:
rect1 = Rectangle()
rect2 = Rectangle()
rect1.height = 20
rect2.height = 30
rect1.width = 40
rect2.width = 10
print(rect1.height * rect1.width)
print(rect2.height * rect2.width)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.