diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2022-01-10 17:08:42 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2022-01-10 17:08:42 +0000 |
commit | 37236fdc957f5900f6a4bbffbff6ccc07d412c44 (patch) | |
tree | 8f26b1f8a03ffd135fd8814ffc8daa9daf0e41e3 /ExampleSubmission/example.py | |
parent | d262c125550dfb952abeb1c953731f470c52decd (diff) | |
download | Smarker-37236fdc957f5900f6a4bbffbff6ccc07d412c44.tar.gz Smarker-37236fdc957f5900f6a4bbffbff6ccc07d412c44.zip |
added to report maker and removed the first markdown renderer
Diffstat (limited to 'ExampleSubmission/example.py')
-rw-r--r-- | ExampleSubmission/example.py | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/ExampleSubmission/example.py b/ExampleSubmission/example.py new file mode 100644 index 0000000..b64c98d --- /dev/null +++ b/ExampleSubmission/example.py @@ -0,0 +1,51 @@ +import tkinter as tk + +class Application(tk.Tk): + """An example class, which implements a GUI by inheriting from tkinter.Tk + """ + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + self.title("Hello World!") + + def a_method_with_defaults(self, arg_1 = "hello", arg_2 = "world"): + """Adds two strings together with a space between them. + + Args: + arg_1 (str, optional): The first string to add. Defaults to "hello". + arg_2 (str, optional): The second string to add. Defaults to "world". + + Returns: + str: A concatinated string. + """ + return "%s %s" % (arg_1, arg_2) + + def add(self, num1:int, num2:int) -> int: + """Adds two numbers together and returns the output + + Args: + num1 (int): The first number to add + num2 (int): The second number to add + + Returns: + int: The two numbers added together + """ + return num1 + num2 + +def hello_world(times): + """Prints 'hello world!' to stdout. Prints it out `times` times. + + Args: + times (int): The number of times to print out hello world. + + Returns: + str: Hello world, repeated as many times as nessicary + """ + return "hello world! " * 3 + +def an_undocumented_function(): + return 3.14156 + +if __name__ == "__main__": + app = Application() + app.mainloop()
\ No newline at end of file |