Last active
January 20, 2022 23:23
-
-
Save temmyzeus/98817a89745b46b0fdee510ae394dba6 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
class Item: | |
# parameters for instance variables are defined in the __init__ function | |
def __init__(self, item_name, price): | |
self.item_name = item_name | |
self.price = price | |
# instance variables are defined when the class is instantiated or created | |
burger = Item(item_name='burger', price=2.55) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment