Created
November 12, 2025 10:46
-
-
Save macleginn/c90b39d848a72fc67ad9da58e8345968 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Counter: | |
| def __init__(self): | |
| self.count = 0 | |
| def get_value(self): | |
| return self.count | |
| def increment(self): | |
| self.count += 1 | |
| def main(): | |
| c = Counter() | |
| c.increment() | |
| print('Current value:', c.get_value()) | |
| if __name__ == "__main__": | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment