Last active
June 5, 2019 03:17
-
-
Save nickgrier07/c3847f02bcf0e9d007844ed735e05e0a to your computer and use it in GitHub Desktop.
Class test
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, internal, external, figure): | |
| self.internal = internal | |
| self.external = external | |
| self.figure = figure | |
| def expo(self): | |
| try: | |
| self.external = self.internal ** self.figure | |
| return self.external | |
| except TypeError: | |
| print("Failed to input proper type.") | |
| def conf_print(self, p_value): | |
| self.p_value = p_value | |
| try: | |
| print("The value is:", self.p_value) | |
| except ValueError: | |
| pass |
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 as c | |
| def main(): | |
| t = c.configure(4,1,8) | |
| t.conf_print(t.expo()) | |
| if __name__=="__main__": | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment