Last active
June 9, 2018 16:55
-
-
Save nickgrier07/0ba6eb148d42608737eb4ba00752f589 to your computer and use it in GitHub Desktop.
Module experiment
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 Configure(object): | |
| def __init__(self, pointM, pointN): | |
| self.pointM = pointM | |
| self.pointN = pointN | |
| self.native = True | |
| def Points(self, M, N, n_): | |
| try: | |
| M = str(M) | |
| N = str(N) | |
| print("Point M is "+M+".") | |
| print("Point N is "+N+".") | |
| if n_: | |
| print("They are both native.") | |
| else: | |
| print("They are both not native") | |
| except: | |
| print("Failed to imput arguments.") |
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
| Point M is 30. | |
| Point N is 1. | |
| They are both native. | |
| Point M is 1. | |
| Point N is 2. | |
| They are both not native |
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
| import Conf | |
| T = Conf.Configure(30, 1) | |
| T.native = True | |
| T.Points(T.pointM,T.pointN,T.native) | |
| T.Points(1,2,False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment