From 8301da20955b56e01dcb45e2fbbd1e015b5ce628 Mon Sep 17 00:00:00 2001 From: cheeks <134818917+leftovertoast@users.noreply.github.com> Date: Thu, 27 Feb 2025 00:20:23 +0000 Subject: [PATCH] Completed Exercise 8-16 Imports --- 8-16_imports.py | 29 +++++++++++++++++++++++++++++ tshirts.py | 3 +++ 2 files changed, 32 insertions(+) create mode 100644 8-16_imports.py create mode 100644 tshirts.py diff --git a/8-16_imports.py b/8-16_imports.py new file mode 100644 index 0000000..2e8ebe8 --- /dev/null +++ b/8-16_imports.py @@ -0,0 +1,29 @@ +# Exercise 8-16 Imports +# Learning Objective: Utilize all of the available import methods with previously made program and functions. + +#import tshirts + +#tshirts.make_shirt("L", "Hello Python World") + +#============================= + +#from tshirts import make_shirt + +#make_shirt("L", "Hello Python World") + +#============================== + +#from tshirts import make_shirt as ms + +#ms("L", "Hello Python World") + +#============================= + +#import tshirts as ts + +#ts.make_shirt("L", "Hello Python World") + +#============================= + +from tshirts import * +make_shirt("L", "Hello Python World") \ No newline at end of file diff --git a/tshirts.py b/tshirts.py new file mode 100644 index 0000000..7537f94 --- /dev/null +++ b/tshirts.py @@ -0,0 +1,3 @@ +def make_shirt(size='S', message='your text here'): + """Takes two string arguments of 'Size' and 'Message' and outputs the resulting string""" + print(f"\tNew shirt to be made:\n\tSIZE: {size}\n\tMESSAGE: {message}") \ No newline at end of file