Created
July 5, 2020 20:39
-
-
Save highsmallxu/4bfc051dfc49c7969759ca22ba2a02fb 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 Time: | |
def __init__(self, year, month, day): | |
self.year = year | |
self.month = month | |
self._day = day | |
def _is_even_number(self, x): | |
return x % 2 == 0 | |
time = Time(2020, 7, 10) | |
print(time.year, time.month, time._day) | |
# 2020 7 10 | |
print(time._is_even_number(10)) | |
# True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment