From 8b21e24104c4b0ddca5253d8b0848ba63fc76072 Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Thu, 7 Jul 2022 12:12:28 -0700 Subject: [PATCH 01/20] completed hello-world --- Ch2 - Basics/helloworld_start.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Ch2 - Basics/helloworld_start.py b/Ch2 - Basics/helloworld_start.py index 7d6b753..c88d0ed 100644 --- a/Ch2 - Basics/helloworld_start.py +++ b/Ch2 - Basics/helloworld_start.py @@ -3,4 +3,11 @@ # LinkedIn Learning Python course by Joe Marini # +def main(): + print('Hello World!') + name = input("What is your name?") + print("Nice to meet you!", name) + +if __name__ == "__main__": + main() From 876fa6a8054f0d137f4097be96d120cc2bba1f96 Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Thu, 7 Jul 2022 12:26:32 -0700 Subject: [PATCH 02/20] completed variables --- Ch2 - Basics/variables_start.py | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Ch2 - Basics/variables_start.py b/Ch2 - Basics/variables_start.py index b2756cc..7d37f44 100644 --- a/Ch2 - Basics/variables_start.py +++ b/Ch2 - Basics/variables_start.py @@ -1,4 +1,4 @@ -# +# # Example file for variables # LinkedIn Learning Python course by Joe Marini # @@ -22,16 +22,34 @@ print(mydict) # re-declaring a variable works +myint = "abc" +print(myint) # to access a member of a sequence type, use [] +print(mylist[2]) +print(mytuple[1]) + # use slices to get parts of a sequence +print(mylist[1:5]) +print(mylist[1:5:2]) # you can use slices to reverse a sequence - +print(mylist[::-1]) # dictionaries are accessed via keys +print(mydict["one"]) # ERROR: variables of different types cannot be combined - +# print("string type" + 123) // error! +print("string type" + str(123)) # Global vs. local variables in functions +def someFunction(): + global mystr + mystr = "def" + print(mystr) + +someFunction() +print(mystr) +del mystr +print(mystr) From cd13f6d11f7620fe4a38cb433b2f1818295035a9 Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Thu, 7 Jul 2022 12:43:39 -0700 Subject: [PATCH 03/20] completed function definitions --- Ch2 - Basics/functions_start.py | 36 +++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/Ch2 - Basics/functions_start.py b/Ch2 - Basics/functions_start.py index 56cb247..7a2a1b6 100644 --- a/Ch2 - Basics/functions_start.py +++ b/Ch2 - Basics/functions_start.py @@ -5,17 +5,45 @@ # TODO: define a basic function - +def func1(): + print("I am a function") # TODO: function that takes arguments - +def func2(arg1, arg2): + print(arg1, " ", arg2) # TODO: function that returns a value - +def cube(x): + return x * x * x # TODO: function with default value for an argument - +def power(num, x=1): + result = 1; + for i in range(x): + result = result * num + return result # TODO: function with variable number of arguments +def multi_add(*args): + result = 0 + for x in args: + result = result + x + return result + + + +func1() +print((func1())) +print(func1) + +func2(10, 20) +print(func2(10, 20)) +print(cube(3)) + +print(power(2)) +print(power(2,3)) +print(power(x=3, num=2)) +print(multi_add(4, 5, 10, 4)) +print(multi_add(4, 5, 10, 4, 10)) From 58a68aeea340f434d5bde8b377854e820c091dbb Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Thu, 7 Jul 2022 12:54:22 -0700 Subject: [PATCH 04/20] completed conditionals --- Ch2 - Basics/conditionals_start.py | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Ch2 - Basics/conditionals_start.py b/Ch2 - Basics/conditionals_start.py index f6b58d6..0c666c5 100644 --- a/Ch2 - Basics/conditionals_start.py +++ b/Ch2 - Basics/conditionals_start.py @@ -6,14 +6,33 @@ def main(): - x, y = 10, 100 + x, y = 1000, 100 # conditional flow uses if, elif, else + if x < y: + result = "x is less than y" + elif x == y: + result = " x is the same as y" + else: + result = " x is greater than y" + print(result) # conditional statements let you use "a if C else b" - + result = "x is less than y" if x < y else "x is greater or equal to y" + print(result) # match-case makes it easy to compare multiple values - value = "one" + value = "three" + match value: + case "one": + result = 1 + case "two": + result = 2 + case "three" | "four": + result = (3,4) + case _: + result = -1 + + print(result) if __name__ == "__main__": main() From ca8092e031d708598990f06056a3bf45889912f3 Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Thu, 7 Jul 2022 13:04:08 -0700 Subject: [PATCH 05/20] completed loops --- Ch2 - Basics/loops_start.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/Ch2 - Basics/loops_start.py b/Ch2 - Basics/loops_start.py index f7d2e75..a2b06a3 100644 --- a/Ch2 - Basics/loops_start.py +++ b/Ch2 - Basics/loops_start.py @@ -8,20 +8,35 @@ def main(): x = 0 # TODO: define a while loop + while (x < 5): + print(x) + x = x + 1 # TODO: define a for loop - + for x in range(15, 20): + print(x) # TODO: use a for loop over a collection days = ["Mon","Tue","Wed","Thu","Fri","Sat","Sun"] + for d in days: + print(d) + # TODO: use the break and continue statements + for x in range(5, 10): + # if x==7: + # break + if x % 2 == 0: + continue + print(x) + + + # TODO: using the enumerate() function to get index + for i,d in enumerate(days): + print(i, d) - # TODO: using the enumerate() function to get index - - if __name__ == "__main__": main() From 361e6a27f6f8bda2ad98ed15021d6424d94b69f3 Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Thu, 7 Jul 2022 13:21:54 -0700 Subject: [PATCH 06/20] completed classes --- Ch2 - Basics/classes_start.py | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/Ch2 - Basics/classes_start.py b/Ch2 - Basics/classes_start.py index de3226d..387a841 100644 --- a/Ch2 - Basics/classes_start.py +++ b/Ch2 - Basics/classes_start.py @@ -3,3 +3,48 @@ # LinkedIn Learning Python course by Joe Marini # +class Vehicle(): + def __init__(self, bodystyle): + self.bodystyle = bodystyle + + def drive(self, speed): + self.mode = "driving" + self.speed = speed + + +class Car(Vehicle): + def __init__(self, enginetype): + super().__init__("Car") + self.wheels = 4 + self.doors = 4 + self.engine = enginetype + + def drive(self, speed): + super().drive(speed) + print("Driving my", self.engine, "car at ", self.speed) + +class Motorcycle(Vehicle): + def __init__(self, enginetype, sidecar): + super().__init__("Motorcycle") + if (sidecar): + self.wheels = 3 + else: + self.wheels = 2 + self.doors = 0 + self.engine = enginetype + + def drive(self, speed): + super().drive(speed) + print("Driving my", self.engine, "Car at ", self.speed) + +car1 = Car("gas") +car2 = Car("electric") +mc1 = Motorcycle("gas", True) + +print(mc1.wheels) +print(car1.engine) +print(car2.doors) + +car1.drive(30) +car2.drive(40) +mc1.drive(50) From 48931102ea445d524a5e9bf1ed52b2f07623b0b5 Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Thu, 7 Jul 2022 15:30:26 -0700 Subject: [PATCH 07/20] completed chapter 2 --- Ch2 - Basics/challenge_start.py | 20 ++++++++++++++++++++ Ch2 - Basics/exceptions_start.py | 22 ++++++++++++++++++---- Ch2 - Basics/modules_start.py | 7 ++++--- 3 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 Ch2 - Basics/challenge_start.py diff --git a/Ch2 - Basics/challenge_start.py b/Ch2 - Basics/challenge_start.py new file mode 100644 index 0000000..b42a281 --- /dev/null +++ b/Ch2 - Basics/challenge_start.py @@ -0,0 +1,20 @@ +# define a function +# convert string to lowercase +# reverse word and test if equal to original string +# need to remove punctuation and spaces +# need to work with numbers or convert number to string... str() + + +def main(): + string=input("Enter String to test for palindrome or 'exit':") + string = str(string).lower() + new_string = ''.join(char for char in string if char.isalnum()) + if new_string== 'exit': + return + elif new_string == new_string[::-1]: + print("Palindrome test:",True) + else: + print("Palindrome test:",False) + +if __name__ == "__main__": + main() diff --git a/Ch2 - Basics/exceptions_start.py b/Ch2 - Basics/exceptions_start.py index a1209c4..8298077 100644 --- a/Ch2 - Basics/exceptions_start.py +++ b/Ch2 - Basics/exceptions_start.py @@ -2,13 +2,27 @@ # Example file for working with classes # LinkedIn Learning Python course by Joe Marini # +0 # Errors can happen in programs, and we need a clean way to handle them # TODO: This code will cause an error because you can't divide by zero: - -# TODO: Exceptions provide a way of catching errors and then handling them in +# x = 10 / 0 +# TODO: Exceptions provide a way of catching errors and then handling them in # a separate section of the code to group them together - +try: + x = 10 / 0 +except: + print("Well that didn't work!") # TODO: You can also catch specific exceptions - +try: + answer = input("What should I divide 10 by?") + num = int(answer) + print(10 / num) +except ZeroDivisionError as e: + print("You can't divide by zero!") +except ValueError as e: + print(e, "isn't a valid number!") + print(e) +finally: + print("The finally section always runs") diff --git a/Ch2 - Basics/modules_start.py b/Ch2 - Basics/modules_start.py index 8c8bf6c..1497853 100644 --- a/Ch2 - Basics/modules_start.py +++ b/Ch2 - Basics/modules_start.py @@ -3,12 +3,13 @@ # TODO: import the math module, which contains features for working with mathematics +import math # TODO: the math module contains lots of pre-built functions +print("The square root of 16 is", math.sqrt(16)) - -# TODO: in addition to functions, some modules contain useful constants - +# TODO: in addition to functions, some modules contain useful constants +print("Pi is", math.pi) # TODO: try some of the math functions for yourself here: From 2283ada41ac54fbd0bffe57e4f7bbaec57b5fbb7 Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Thu, 7 Jul 2022 15:39:21 -0700 Subject: [PATCH 08/20] completed files --- Ch3 - Files/files_start.py | 20 ++++++++++++++------ Ch3 - Files/textfile.txt | 20 ++++++++++++++++++++ 2 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 Ch3 - Files/textfile.txt diff --git a/Ch3 - Files/files_start.py b/Ch3 - Files/files_start.py index fb026bb..6212453 100644 --- a/Ch3 - Files/files_start.py +++ b/Ch3 - Files/files_start.py @@ -4,21 +4,29 @@ # -def main(): +def main(): # Open a file for writing and create it if it doesn't exist + # myfile = open("textfile.txt", "w+") - # Open the file for appending text to the end - + # myfile = open("textfile.txt", "a+") # write some lines of data to the file + # for i in range(10): + # myfile.write("This is some new text\n") - # close the file when done + # myfile.close() + - # Open the file back up and read the contents + myfile = open("textfile.txt", "r") + if myfile.mode == 'r': + # contents = myfile.read() + # print(contents) + fl = myfile.readlines() + for x in fl: + print(x) - if __name__ == "__main__": main() diff --git a/Ch3 - Files/textfile.txt b/Ch3 - Files/textfile.txt new file mode 100644 index 0000000..0d5bc3a --- /dev/null +++ b/Ch3 - Files/textfile.txt @@ -0,0 +1,20 @@ +This is some text +This is some text +This is some text +This is some text +This is some text +This is some text +This is some text +This is some text +This is some text +This is some text +This is some new text +This is some new text +This is some new text +This is some new text +This is some new text +This is some new text +This is some new text +This is some new text +This is some new text +This is some new text From f79fc5909c414fb81eb8e76ba7ca04aa8688ed15 Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Thu, 7 Jul 2022 16:15:24 -0700 Subject: [PATCH 09/20] completed ospathutils --- Ch3 - Files/ospathutils_start.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Ch3 - Files/ospathutils_start.py b/Ch3 - Files/ospathutils_start.py index 3384cbd..9844a90 100644 --- a/Ch3 - Files/ospathutils_start.py +++ b/Ch3 - Files/ospathutils_start.py @@ -12,19 +12,25 @@ def main(): # Print the name of the OS + print(os.name) - # Check for item existence and type + print("Item exists:", str(path.exists("textfile.txt"))) + print("Item is a file:", path.isfile("textfile.txt")) + print("Item is a directory:", path.isdir("textfile.txt")) - # Work with file paths + print("Item's path:", path.realpath("textfile.txt")) + print("Item's path and name:", path.split(path.realpath("textfile.txt"))) - # Get the modification time + t = time.ctime(path.getmtime("textfile.txt")) + print(t) + print(datetime.datetime.fromtimestamp(path.getmtime("textfile.txt"))) - # Calculate how long ago the item was modified - - + td = datetime.datetime.now() - datetime.datetime.fromtimestamp(path.getmtime("textfile.txt")) + print("It has been", td, "since the file was modified") + print("Or,", td.total_seconds(), "seconds") if __name__ == "__main__": main() From 20846782db52c0662f2c94195ef2c1a5bd8760ee Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Thu, 7 Jul 2022 16:40:12 -0700 Subject: [PATCH 10/20] completed shell --- Ch3 - Files/archive.zip | Bin 0 -> 6875 bytes Ch3 - Files/{textfile.txt => newfile.txt} | 0 Ch3 - Files/shell_start.py | 23 ++++++++++++++++------ Ch3 - Files/testzip.zip | Bin 0 -> 1028 bytes Ch3 - Files/textfile.txt.bak | 20 +++++++++++++++++++ 5 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 Ch3 - Files/archive.zip rename Ch3 - Files/{textfile.txt => newfile.txt} (100%) create mode 100644 Ch3 - Files/testzip.zip create mode 100644 Ch3 - Files/textfile.txt.bak diff --git a/Ch3 - Files/archive.zip b/Ch3 - Files/archive.zip new file mode 100644 index 0000000000000000000000000000000000000000..04050ce4e3fc7efac82c23ce32a2e060809a3a5b GIT binary patch literal 6875 zcma)>1yEe;mW6S5cY=iwJUER6cL>nI-9qCuP9s5ryMz#2g1ZLS;I1JMLeR#W;1Zb5 zymu$L^X^p5={j|)yK3z^)ocCxKl?i`RFF|f5D*YB5Fo}oz&-S`+$lr^gbyeP2;}fz zo!wl_-EBSGK@M)FHXtXEo2|7Kmy1uT_PEnB4^HPk8^#U~_5K|KDwrxPPbQq~v$=vy zBlKMaCnXUwtFxpsIJkdlY63l7a-H?wZ>0p+53uJ-MIag#e#!&rVr>ga|AV72TRh|brJ;ACvtdHStE}Nq?Rx4^?*oTaH-bZMJo=gQr z0upOuMaBC~#NK7g|F!LKaZk{>2>%Sx<{)e?+i`5A>FuV)9Z4FTzabcid``7EcU{*0{#2khiZcA$q!MCUziI#5m z5@5}j^Zvr9Q>72=C|J{1<|s0BhMxEC=uFvxxf}uyZ_{^zSgHDJTrNk76KL4o<9#D~ z(PxYhw3sZHbrsF2BEBJaDBS|K5wQWK1v-3~gv9juIp!HDt+B7rRvF@z43SM)M}@wm z$DGSW(8Nlc>1TPlIG271zu>{ZIdcl@8NPsKsjx6tjf-+L<_@#G<6P--{%WKH+v3iC z75*yFRs#q6Lkoh<^ITk$}# zj1ZCT=5Xp_#JtlR8NwqHX9=V4M=g`94a@_CTJe1dOkfR1qV)`XAqP|B_Pl5*%H!yM zB!2$EP#66*0K=WjG`ch1fP136t^a!Z&jdU2jMc#0`M|ZoNX9;>lkMVbeg71!XbWv?5xJKViw77C@@Ycr~yNOZ5D zps(n8Pj6(pQfZ+5wn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q&e^md5(IDM?nA784w0WKOg3W=r=&^>cEo0Max}HvNqIFy|Er0CUN03=_ zNIuBw_kd{`x`y`Q}|Di?6(jE z7ybt_``_~a4Nrc{6EOY{l=5c@|9_a$f0y_*xBoG-|0(>Zp8Q+b2#>|zJM^F0e`*%L dwR&WKPs?w+QQ?0G0sMM+3TX0ZYg73b%sDwL#F zlyD6(5ujhNxO>Qo2EZduycsp(1b`6-iXd3b=_Ms*53#tyOkYDbo=`#_?u!6#MkWzv y+!+s)AwghCBZvfQgGDB?Mr;ueQVs%38g~NoFnTfw@MdKL$ua?9Igl=A2Jrx&=1s2v literal 0 HcmV?d00001 diff --git a/Ch3 - Files/textfile.txt.bak b/Ch3 - Files/textfile.txt.bak new file mode 100644 index 0000000..0d5bc3a --- /dev/null +++ b/Ch3 - Files/textfile.txt.bak @@ -0,0 +1,20 @@ +This is some text +This is some text +This is some text +This is some text +This is some text +This is some text +This is some text +This is some text +This is some text +This is some text +This is some new text +This is some new text +This is some new text +This is some new text +This is some new text +This is some new text +This is some new text +This is some new text +This is some new text +This is some new text From 945aa54a4bd3d61f0249325748c8eb99cf506312 Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Thu, 7 Jul 2022 18:41:12 -0700 Subject: [PATCH 11/20] in progress challenge --- Ch3 - Files/challenge.py | 29 +++++++++++++++++++++++++++++ Ch3 - Files/results/results.txt | 17 +++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 Ch3 - Files/challenge.py create mode 100644 Ch3 - Files/results/results.txt diff --git a/Ch3 - Files/challenge.py b/Ch3 - Files/challenge.py new file mode 100644 index 0000000..d87033e --- /dev/null +++ b/Ch3 - Files/challenge.py @@ -0,0 +1,29 @@ +# make a program to make a new directory with a txt file in it +# the txt file needs to have all the names of the files listed and the bytes of all of them +# +# define a function +# use listdir() to return a list containing the names of the entries in the directory given by path +# use mkdir() to create a directory for the new .txt file +import os +from os import path + +def main(): + src = path.realpath("challenge.py") + root_dir, tail = path.split(src) + list = os.listdir(root_dir) + + os.mkdir("results") + myfile = open("./results/results.txt", "w+") + bytes = 0 + for x in list: + bytes += os.path.getsize(x) + myfile.write('Total bytecount: ' + str(bytes) + '\n') + myfile.write('Files list: \n') + myfile.write('------------------- \n') + for x in list: + myfile.write(x + '\n') + + myfile.close() + +if __name__ == "__main__": + main() diff --git a/Ch3 - Files/results/results.txt b/Ch3 - Files/results/results.txt new file mode 100644 index 0000000..0565612 --- /dev/null +++ b/Ch3 - Files/results/results.txt @@ -0,0 +1,17 @@ +Total bytecount: 22887 +Files list: +------------------- +.DS_Store +ospathutils_finished.py +shell_start.py +sfdfg +testzip.zip +files_finished.py +textfile.txt.bak +newfile.txt +shell_finished.py +challenge_solution.py +archive.zip +files_start.py +challenge.py +ospathutils_start.py From d48eb1ff212c72235d5100f8c6c4be3a31138ac9 Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Fri, 8 Jul 2022 11:45:28 -0700 Subject: [PATCH 12/20] completed challenge --- Ch3 - Files/challenge.py | 11 ++++++++--- Ch3 - Files/results/results.txt | 7 +++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Ch3 - Files/challenge.py b/Ch3 - Files/challenge.py index d87033e..ac9d752 100644 --- a/Ch3 - Files/challenge.py +++ b/Ch3 - Files/challenge.py @@ -4,6 +4,7 @@ # define a function # use listdir() to return a list containing the names of the entries in the directory given by path # use mkdir() to create a directory for the new .txt file + import os from os import path @@ -16,12 +17,16 @@ def main(): myfile = open("./results/results.txt", "w+") bytes = 0 for x in list: - bytes += os.path.getsize(x) + if os.path.isfile(x): + bytes += os.path.getsize(x) myfile.write('Total bytecount: ' + str(bytes) + '\n') myfile.write('Files list: \n') - myfile.write('------------------- \n') + myfile.write('---------------- \n') + for x in list: - myfile.write(x + '\n') + if os.path.isfile(x): + myfile.write(x + '\n') + myfile.close() diff --git a/Ch3 - Files/results/results.txt b/Ch3 - Files/results/results.txt index 0565612..c2fc35c 100644 --- a/Ch3 - Files/results/results.txt +++ b/Ch3 - Files/results/results.txt @@ -1,10 +1,9 @@ -Total bytecount: 22887 -Files list: -------------------- +Total bytecount:22881 +Files list: +-------------- .DS_Store ospathutils_finished.py shell_start.py -sfdfg testzip.zip files_finished.py textfile.txt.bak From e897f64e02659669b570a9e70b8922b8473ca205 Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Fri, 8 Jul 2022 11:53:32 -0700 Subject: [PATCH 13/20] finished Ch3 --- Ch3 - Files/challenge.py | 1 - Ch3 - Files/files_start.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Ch3 - Files/challenge.py b/Ch3 - Files/challenge.py index ac9d752..37e69a0 100644 --- a/Ch3 - Files/challenge.py +++ b/Ch3 - Files/challenge.py @@ -1,6 +1,5 @@ # make a program to make a new directory with a txt file in it # the txt file needs to have all the names of the files listed and the bytes of all of them -# # define a function # use listdir() to return a list containing the names of the entries in the directory given by path # use mkdir() to create a directory for the new .txt file diff --git a/Ch3 - Files/files_start.py b/Ch3 - Files/files_start.py index 6212453..a960f2a 100644 --- a/Ch3 - Files/files_start.py +++ b/Ch3 - Files/files_start.py @@ -6,7 +6,7 @@ def main(): # Open a file for writing and create it if it doesn't exist - # myfile = open("textfile.txt", "w+") + # myfile = open("textfilez.txt", "w+") # Open the file for appending text to the end # myfile = open("textfile.txt", "a+") From a99a86ab637ca718c81f4ce4a901f25d98c5a360 Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Fri, 8 Jul 2022 15:03:33 -0700 Subject: [PATCH 14/20] completed dates and times --- Ch4 - Dates and Times/calendars_start.py | 29 +++++++++++--- Ch4 - Dates and Times/challenge_start.py | 48 ++++++++++++++++++++++- Ch4 - Dates and Times/dates_start.py | 23 +++++++---- Ch4 - Dates and Times/formatting_start.py | 19 +++++---- Ch4 - Dates and Times/timedeltas_start.py | 22 +++++++---- 5 files changed, 113 insertions(+), 28 deletions(-) diff --git a/Ch4 - Dates and Times/calendars_start.py b/Ch4 - Dates and Times/calendars_start.py index 2963f70..7ec9381 100644 --- a/Ch4 - Dates and Times/calendars_start.py +++ b/Ch4 - Dates and Times/calendars_start.py @@ -5,24 +5,43 @@ # TODO: import the calendar module - +import calendar # TODO: create a plain text calendar - +c = calendar.TextCalendar(calendar.SUNDAY) +# str = c.formatmonth(2022, 1, 0, 0) +# print(str) # TODO: create an HTML formatted calendar - - +# hc = calendar.HTMLCalendar(calendar.SUNDAY) +# str = hc.formatmonth(2022, 1) +# print(str) # TODO: loop over the days of a month # zeroes mean that the day of the week is in an overlapping month +# for i in c.itermonthdays(2022, 8): +# print(i) - # TODO: The Calendar module provides useful utilities for the given locale, # such as the names of days and months in both full and abbreviated forms +for name in calendar.month_name: + print(name) +for day in calendar.day_name: + print(day) # TODO: Calculate days based on a rule: For example, consider # a team meeting on the first Friday of every month. # To figure out what days that would be for each month, # we can use this script: +print("Team meetings will be on:") +for m in range(1, 13): + cal = calendar.monthcalendar(2022, m) + weekone = cal[0] + weektwo = cal[1] + if weekone[calendar.FRIDAY] != 0: + meetday = weekone[calendar.FRIDAY] + else: + meetday = weektwo[calendar.FRIDAY] + + print(calendar.month_name[m], meetday) diff --git a/Ch4 - Dates and Times/challenge_start.py b/Ch4 - Dates and Times/challenge_start.py index 9da42cb..6928fe5 100644 --- a/Ch4 - Dates and Times/challenge_start.py +++ b/Ch4 - Dates and Times/challenge_start.py @@ -1,5 +1,51 @@ # Start file for programming challenge for Learning Python course # LinkedIn Learning Python course by Joe Marini -# +# print to the terminal, which day of the week do you want to count? +# then give a list of days with the indexes +# if they type exit, then quit the program +# if they type a valid number then ask them what month +# then what year +# when they type the year, there needs to be an equation to count the number of days in the month of that year + import calendar + +def main(): + + daysinmonth = 0 + dayoftheweek = 0 + month = 0 + year = 0 + + dayoftheweek = input("Which day of the week do you want to count? \n 0: Monday \n 1: Tuesday \n 2: Wednesday \n 3: Thursday \n 4: Friday \n 5: Saturday \n 6: Sunday \n or 'exit' to quit \n? " ) + if dayoftheweek == 'exit': + return + elif dayoftheweek.isnumeric() == False: + print("Value must be a positive integer!") + main() + + month = input("Enter Month: ") + if month == 'exit': + return + elif month.isnumeric() == False: + print("Value must be a positive integer!") + main() + + year = input("Enter Year: ") + if year == 'exit': + return + elif year.isnumeric() == False: + print("Value must be a positive integer!") + main() + + c = calendar.monthcalendar(int(year), int(month)) + for i in c: + if i[int(dayoftheweek)] != 0: + daysinmonth +=1 + + + + print('There are '+ str(daysinmonth) + ' days in the month of ' + str(month) +', ' + str(year)) + main() +if __name__ == "__main__": + main() diff --git a/Ch4 - Dates and Times/dates_start.py b/Ch4 - Dates and Times/dates_start.py index 9091c40..a8fb1dc 100644 --- a/Ch4 - Dates and Times/dates_start.py +++ b/Ch4 - Dates and Times/dates_start.py @@ -3,28 +3,37 @@ # LinkedIn Learning Python course by Joe Marini # +from datetime import date +from datetime import time +from datetime import datetime def main(): ## DATE OBJECTS # TODO: Get today's date from the simple today() method from the date class - + today = date.today() + print(today) # TODO: print out the date's individual components + print("Date Components:", today.day, today.month, today.year) - # TODO: retrieve today's weekday (0=Monday, 6=Sunday) + print("Today's weekday number is", today.weekday()) + days = ["mon", "tues", "wed", "thurs", "fri", "sat", "sun"] + print("Which is a ", days[today.weekday()]) - ## DATETIME OBJECTS # TODO: Get today's date from the datetime class + today = datetime.now() + print ("The current date and time is ", today) - # TODO: Get the current time - + t = datetime.time(datetime.now()) + print(t) + + + - if __name__ == "__main__": main() - \ No newline at end of file diff --git a/Ch4 - Dates and Times/formatting_start.py b/Ch4 - Dates and Times/formatting_start.py index 6c40839..67f21df 100644 --- a/Ch4 - Dates and Times/formatting_start.py +++ b/Ch4 - Dates and Times/formatting_start.py @@ -8,21 +8,26 @@ def main(): # Times and dates can be formatted using a set of predefined string - # control codes + # control codes + + now = datetime.now() - #### Date Formatting #### - - # %y/%Y - Year, %a/%A - weekday, %b/%B - month, %d - day of month + # %y/%Y - Year, %a/%A - weekday, %b/%B - month, %d - day of month + print(now.strftime('The Current year is: %Y')) + print(now.strftime('%a %d, %B, %Y')) # %c - locale's date and time, %x - locale's date, %X - locale's time - + print(now.strftime("Local date and time: %c")) + print(now.strftime("Local date and time: %c")) + print(now.strftime("Local Time: %X")) #### Time Formatting #### - + # %I/%H - 12/24 Hour, %M - minute, %S - second, %p - locale's AM/PM - + print(now.strftime("Current Time: %I:%M:%S %p")) + if __name__ == "__main__": main() diff --git a/Ch4 - Dates and Times/timedeltas_start.py b/Ch4 - Dates and Times/timedeltas_start.py index a6b62bc..d4ba51c 100644 --- a/Ch4 - Dates and Times/timedeltas_start.py +++ b/Ch4 - Dates and Times/timedeltas_start.py @@ -7,29 +7,35 @@ from datetime import date from datetime import time from datetime import datetime - +from datetime import timedelta # TODO: construct a basic timedelta and print it - +print(timedelta(days=365, hours=5, minutes=1)) # TODO: print today's date +now = datetime.now() +print ("today is: " + str(now)) # TODO: print today's date one year from now - +print ("one year from now it will be: " + str(now + timedelta(days=365))) # TODO: create a timedelta that uses more than one argument - +print ("in four weeks and 3 days it will be: " + str(now + timedelta(weeks=4, days=3))) # TODO: calculate the date 1 week ago, formatted as a string ### How many days until April Fools' Day? - +today = date.today() +xmas = date(today.year, 12, 25) # TODO: use date comparison to see if April Fool's has already gone for this year # if it has, use the replace() function to get the date for next year +if xmas < today: + print ("Christmas already went by %d days ago" % ((today-xmas).days)) + xmas = xmas.replace(year=today.year + 1) - -# TODO: Now calculate the amount of time until April Fool's Day - +# TODO: Now calculate the amount of time until April Fool's Day +time_to_xmas = xmas - today +print ("It's just", time_to_xmas.days, "days until Christmas!") From 540fe05ed08b6734e3be135cf1654811b72652c3 Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Fri, 8 Jul 2022 16:41:34 -0700 Subject: [PATCH 15/20] completed learning-python --- Ch5 - Internet Data/htmlparsing_start.py | 31 ++++++++++++---- Ch5 - Internet Data/inetdata_start.py | 10 ++++-- Ch5 - Internet Data/jsondata_finished.py | 2 ++ Ch5 - Internet Data/jsondata_start.py | 46 +++++++++++++++++------- Ch5 - Internet Data/xmlparsing_start.py | 24 +++++++++---- 5 files changed, 84 insertions(+), 29 deletions(-) diff --git a/Ch5 - Internet Data/htmlparsing_start.py b/Ch5 - Internet Data/htmlparsing_start.py index a759ac3..28a3837 100644 --- a/Ch5 - Internet Data/htmlparsing_start.py +++ b/Ch5 - Internet Data/htmlparsing_start.py @@ -1,29 +1,46 @@ -# +# # Example file for parsing and processing HTML # LinkedIn Learning Python course by Joe Marini # from html.parser import HTMLParser +paragraphs = 0 class MyHTMLParser(HTMLParser): def handle_comment(self, data): - pass + print("encountered a comment:", data) + pos = self.getpos() + print("At line:", pos[0], "position", pos[1]) def handle_starttag(self, tag, attrs): - pass + print("encountered a start tag:", tag) + pos = self.getpos() + print("At line:", pos[0], "position", pos[1]) + + global paragraphs + if tag == "p": + paragraphs += 1 + + if len(attrs) > 0: + print("Attributes:") + for a in attrs: + print("\t", a[0], "=", a[1]) + def handle_data(self, data): - pass + print("encountered text data:", data) + pos = self.getpos() + print("At line:", pos[0], "position", pos[1]) def main(): # instantiate the parser and feed it some HTML parser = MyHTMLParser() - + f = open("samplehtml.html") if f.mode == "r": contents = f.read() # read the entire file - parser.feed(contents) + parser.feed(contents) + print(paragraphs) if __name__ == "__main__": main() - \ No newline at end of file diff --git a/Ch5 - Internet Data/inetdata_start.py b/Ch5 - Internet Data/inetdata_start.py index 86dc094..0a69095 100644 --- a/Ch5 - Internet Data/inetdata_start.py +++ b/Ch5 - Internet Data/inetdata_start.py @@ -1,10 +1,16 @@ -# +# # Example file for retrieving data from the internet # LinkedIn Learning Python course by Joe Marini # +import urllib.request + def main(): - pass # this is a placeholder, do-nothing statement + weburl = urllib.request.urlopen("http://www.google.com") + print("result code:", weburl.getcode()) + data = weburl.read() + print(data) + if __name__ == "__main__": main() diff --git a/Ch5 - Internet Data/jsondata_finished.py b/Ch5 - Internet Data/jsondata_finished.py index d244ebf..583bccb 100644 --- a/Ch5 - Internet Data/jsondata_finished.py +++ b/Ch5 - Internet Data/jsondata_finished.py @@ -6,6 +6,7 @@ import urllib.request # instead of urllib2 like in Python 2.7 import json +import ssl def printResults(data): @@ -45,6 +46,7 @@ def main(): # define a variable to hold the source URL # In this case we'll use the free data feed from the USGS # This feed lists all earthquakes for the last day larger than Mag 2.5 + ssl._create_default_https_context = ssl._create_unverified_context urlData = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.geojson" # Open the URL and read the data diff --git a/Ch5 - Internet Data/jsondata_start.py b/Ch5 - Internet Data/jsondata_start.py index e0da623..da440eb 100644 --- a/Ch5 - Internet Data/jsondata_start.py +++ b/Ch5 - Internet Data/jsondata_start.py @@ -1,39 +1,59 @@ -# +# # Example file for parsing and processing JSON # LinkedIn Learning Python course by Joe Marini # -import urllib.request +import urllib.request +import json +import ssl def printResults(data): # Use the json module to load the string data into a dictionary theJSON = json.loads(data) - - # now we can access the contents of the JSON like any other Python object - - # output the number of events, plus the magnitude and each event name + # # now we can access the contents of the JSON like any other Python object + if "title" in theJSON["metadata"]: + print(theJSON["metadata"]["title"]) - - # for each event, print the place where it occurred + # # output the number of events, plus the magnitude and each event name + count = theJSON["metadata"]["count"] + print(count, "events recorded") + # for each event, print the place where it occurred + for i in theJSON["features"]: + print(i["properties"]["place"]) + print("--------------\n") # print the events that only have a magnitude greater than 4 - + for i in theJSON["features"]: + if i["properties"]["mag"] >= 4: + print(i["properties"]["mag"], i["properties"]["title"]) # print only the events where at least 1 person reported feeling something + print("felt quakes: ") + for i in theJSON["features"]: + feltReports = i["properties"]["felt"] + if (feltReports != None): + if (feltReports > 0): + print(i["properties"]["mag"], i["properties"] + ["place"], " reported " + str(feltReports) + " times") + - def main(): # define a variable to hold the source URL # In this case we'll use the free data feed from the USGS # This feed lists all earthquakes for the last day larger than Mag 2.5 - urlData = "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.geojson" + ssl._create_default_https_context = ssl._create_unverified_context + urlData = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_day.geojson" # Open the URL and read the data webUrl = urllib.request.urlopen(urlData) - print ("result code: " + str(webUrl.getcode())) - + print ("result code: ", webUrl.getcode()) + if (webUrl.getcode() == 200): + data = webUrl.read() + printResults(data) + else: + print("Recieved an error from the server, cannot print results", webUrl.getcode()) if __name__ == "__main__": main() diff --git a/Ch5 - Internet Data/xmlparsing_start.py b/Ch5 - Internet Data/xmlparsing_start.py index 3129b0c..1960571 100644 --- a/Ch5 - Internet Data/xmlparsing_start.py +++ b/Ch5 - Internet Data/xmlparsing_start.py @@ -1,23 +1,33 @@ -# +# # Example file for parsing and processing XML # LinkedIn Learning Python course by Joe Marini # - +import xml.dom.minidom def main(): # use the parse() function to load and parse an XML file + doc = xml.dom.minidom.parse("samplexml.xml") - # print out the document node and the name of the first child tag - + print(doc.nodeName) + print(doc.firstChild.tagName) # get a list of XML tags from the document and print each one + skills = doc.getElementsByTagName("skill") + print(skills.length, "skills are listed") + for skill in skills: + print(skill.getAttribute("name")) - # create a new XML tag and add it into the document + newSkill = doc.createElement("skill") + newSkill.setAttribute("name", "jQuery") + doc.firstChild.appendChild(newSkill) + + skills = doc.getElementsByTagName("skill") + print(skills.length, "skills are listed") + for skill in skills: + print(skill.getAttribute("name")) - if __name__ == "__main__": main() - From 503f0bc121a4e677530a887fffdca55c0a9cff8c Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Fri, 8 Jul 2022 17:13:56 -0700 Subject: [PATCH 16/20] updated --- learning-python/.github/CODEOWNERS | 3 ++ learning-python/.github/ISSUE_TEMPLATE.md | 34 ++++++++++++++++++ .../.github/PULL_REQUEST_TEMPLATE.md | 1 + learning-python/.github/workflows/main.yml | 12 +++++++ learning-python/.gitignore | 4 +++ .../CONTRIBUTING.md | 0 .../Ch2 - Basics}/challenge_solution.py | 0 .../Ch2 - Basics}/challenge_start.py | 0 .../Ch2 - Basics}/classes_finished.py | 0 .../Ch2 - Basics}/classes_start.py | 0 .../Ch2 - Basics}/conditionals_finished.py | 0 .../Ch2 - Basics}/conditionals_start.py | 0 .../Ch2 - Basics}/exceptions_finished.py | 0 .../Ch2 - Basics}/exceptions_start.py | 0 .../Ch2 - Basics}/functions_finished.py | 0 .../Ch2 - Basics}/functions_start.py | 0 .../Ch2 - Basics}/helloworld_finished.py | 0 .../Ch2 - Basics}/helloworld_start.py | 0 .../Ch2 - Basics}/loops_finished.py | 0 .../Ch2 - Basics}/loops_start.py | 0 .../Ch2 - Basics}/modules_finished.py | 0 .../Ch2 - Basics}/modules_start.py | 0 .../Ch2 - Basics}/variables_finished.py | 0 .../Ch2 - Basics}/variables_start.py | 0 .../Ch3 - Files}/archive.zip | Bin .../Ch3 - Files}/challenge.py | 0 .../Ch3 - Files}/challenge_solution.py | 0 .../Ch3 - Files}/files_finished.py | 0 .../Ch3 - Files}/files_start.py | 0 .../Ch3 - Files}/newfile.txt | 0 .../Ch3 - Files}/ospathutils_finished.py | 0 .../Ch3 - Files}/ospathutils_start.py | 0 .../Ch3 - Files}/results/results.txt | 0 .../Ch3 - Files}/shell_finished.py | 0 .../Ch3 - Files}/shell_start.py | 0 .../Ch3 - Files}/testzip.zip | Bin .../Ch3 - Files}/textfile.txt.bak | 0 .../calendars_finished.py | 0 .../Ch4 - Dates and Times}/calendars_start.py | 0 .../challenge_solution.py | 0 .../Ch4 - Dates and Times}/challenge_start.py | 0 .../Ch4 - Dates and Times}/dates_finished.py | 0 .../Ch4 - Dates and Times}/dates_start.py | 0 .../formatting_finished.py | 0 .../formatting_start.py | 0 .../timedeltas_finished.py | 0 .../timedeltas_start.py | 0 .../htmlparsing_finished.py | 0 .../Ch5 - Internet Data}/htmlparsing_start.py | 0 .../Ch5 - Internet Data}/inetdata_finished.py | 0 .../Ch5 - Internet Data}/inetdata_start.py | 0 .../Ch5 - Internet Data}/jsondata_finished.py | 0 .../Ch5 - Internet Data}/jsondata_start.py | 0 .../Ch5 - Internet Data}/samplehtml.html | 0 .../Ch5 - Internet Data}/samplexml.xml | 0 .../xmlparsing_finished.py | 0 .../Ch5 - Internet Data}/xmlparsing_start.py | 0 LICENSE => learning-python/LICENSE | 0 NOTICE => learning-python/NOTICE | 0 README.md => learning-python/README.md | 0 60 files changed, 54 insertions(+) create mode 100644 learning-python/.github/CODEOWNERS create mode 100644 learning-python/.github/ISSUE_TEMPLATE.md create mode 100644 learning-python/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 learning-python/.github/workflows/main.yml create mode 100644 learning-python/.gitignore rename CONTRIBUTING.md => learning-python/CONTRIBUTING.md (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/challenge_solution.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/challenge_start.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/classes_finished.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/classes_start.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/conditionals_finished.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/conditionals_start.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/exceptions_finished.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/exceptions_start.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/functions_finished.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/functions_start.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/helloworld_finished.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/helloworld_start.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/loops_finished.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/loops_start.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/modules_finished.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/modules_start.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/variables_finished.py (100%) rename {Ch2 - Basics => learning-python/Ch2 - Basics}/variables_start.py (100%) rename {Ch3 - Files => learning-python/Ch3 - Files}/archive.zip (100%) rename {Ch3 - Files => learning-python/Ch3 - Files}/challenge.py (100%) rename {Ch3 - Files => learning-python/Ch3 - Files}/challenge_solution.py (100%) rename {Ch3 - Files => learning-python/Ch3 - Files}/files_finished.py (100%) rename {Ch3 - Files => learning-python/Ch3 - Files}/files_start.py (100%) rename {Ch3 - Files => learning-python/Ch3 - Files}/newfile.txt (100%) rename {Ch3 - Files => learning-python/Ch3 - Files}/ospathutils_finished.py (100%) rename {Ch3 - Files => learning-python/Ch3 - Files}/ospathutils_start.py (100%) rename {Ch3 - Files => learning-python/Ch3 - Files}/results/results.txt (100%) rename {Ch3 - Files => learning-python/Ch3 - Files}/shell_finished.py (100%) rename {Ch3 - Files => learning-python/Ch3 - Files}/shell_start.py (100%) rename {Ch3 - Files => learning-python/Ch3 - Files}/testzip.zip (100%) rename {Ch3 - Files => learning-python/Ch3 - Files}/textfile.txt.bak (100%) rename {Ch4 - Dates and Times => learning-python/Ch4 - Dates and Times}/calendars_finished.py (100%) rename {Ch4 - Dates and Times => learning-python/Ch4 - Dates and Times}/calendars_start.py (100%) rename {Ch4 - Dates and Times => learning-python/Ch4 - Dates and Times}/challenge_solution.py (100%) rename {Ch4 - Dates and Times => learning-python/Ch4 - Dates and Times}/challenge_start.py (100%) rename {Ch4 - Dates and Times => learning-python/Ch4 - Dates and Times}/dates_finished.py (100%) rename {Ch4 - Dates and Times => learning-python/Ch4 - Dates and Times}/dates_start.py (100%) rename {Ch4 - Dates and Times => learning-python/Ch4 - Dates and Times}/formatting_finished.py (100%) rename {Ch4 - Dates and Times => learning-python/Ch4 - Dates and Times}/formatting_start.py (100%) rename {Ch4 - Dates and Times => learning-python/Ch4 - Dates and Times}/timedeltas_finished.py (100%) rename {Ch4 - Dates and Times => learning-python/Ch4 - Dates and Times}/timedeltas_start.py (100%) rename {Ch5 - Internet Data => learning-python/Ch5 - Internet Data}/htmlparsing_finished.py (100%) rename {Ch5 - Internet Data => learning-python/Ch5 - Internet Data}/htmlparsing_start.py (100%) rename {Ch5 - Internet Data => learning-python/Ch5 - Internet Data}/inetdata_finished.py (100%) rename {Ch5 - Internet Data => learning-python/Ch5 - Internet Data}/inetdata_start.py (100%) rename {Ch5 - Internet Data => learning-python/Ch5 - Internet Data}/jsondata_finished.py (100%) rename {Ch5 - Internet Data => learning-python/Ch5 - Internet Data}/jsondata_start.py (100%) rename {Ch5 - Internet Data => learning-python/Ch5 - Internet Data}/samplehtml.html (100%) rename {Ch5 - Internet Data => learning-python/Ch5 - Internet Data}/samplexml.xml (100%) rename {Ch5 - Internet Data => learning-python/Ch5 - Internet Data}/xmlparsing_finished.py (100%) rename {Ch5 - Internet Data => learning-python/Ch5 - Internet Data}/xmlparsing_start.py (100%) rename LICENSE => learning-python/LICENSE (100%) rename NOTICE => learning-python/NOTICE (100%) rename README.md => learning-python/README.md (100%) diff --git a/learning-python/.github/CODEOWNERS b/learning-python/.github/CODEOWNERS new file mode 100644 index 0000000..97f37e0 --- /dev/null +++ b/learning-python/.github/CODEOWNERS @@ -0,0 +1,3 @@ +# Codeowners for these exercise files: +# * (asterisk) deotes "all files and folders" +# Example: * @producer @instructor diff --git a/learning-python/.github/ISSUE_TEMPLATE.md b/learning-python/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..20ff87d --- /dev/null +++ b/learning-python/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,34 @@ + + +## Issue Overview + + +## Describe your environment + + +## Steps to Reproduce + +1. +2. +3. +4. + +## Expected Behavior + + +## Current Behavior + + +## Possible Solution + + +## Screenshots / Video + + +## Related Issues + diff --git a/learning-python/.github/PULL_REQUEST_TEMPLATE.md b/learning-python/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..6ae59ec --- /dev/null +++ b/learning-python/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1 @@ + diff --git a/learning-python/.github/workflows/main.yml b/learning-python/.github/workflows/main.yml new file mode 100644 index 0000000..1732566 --- /dev/null +++ b/learning-python/.github/workflows/main.yml @@ -0,0 +1,12 @@ +name: Copy To Branches +on: + workflow_dispatch: +jobs: + copy-to-branches: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Copy To Branches Action + uses: planetoftheweb/copy-to-branches@v1 diff --git a/learning-python/.gitignore b/learning-python/.gitignore new file mode 100644 index 0000000..4b64bc3 --- /dev/null +++ b/learning-python/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +node_modules +.tmp +npm-debug.log diff --git a/CONTRIBUTING.md b/learning-python/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to learning-python/CONTRIBUTING.md diff --git a/Ch2 - Basics/challenge_solution.py b/learning-python/Ch2 - Basics/challenge_solution.py similarity index 100% rename from Ch2 - Basics/challenge_solution.py rename to learning-python/Ch2 - Basics/challenge_solution.py diff --git a/Ch2 - Basics/challenge_start.py b/learning-python/Ch2 - Basics/challenge_start.py similarity index 100% rename from Ch2 - Basics/challenge_start.py rename to learning-python/Ch2 - Basics/challenge_start.py diff --git a/Ch2 - Basics/classes_finished.py b/learning-python/Ch2 - Basics/classes_finished.py similarity index 100% rename from Ch2 - Basics/classes_finished.py rename to learning-python/Ch2 - Basics/classes_finished.py diff --git a/Ch2 - Basics/classes_start.py b/learning-python/Ch2 - Basics/classes_start.py similarity index 100% rename from Ch2 - Basics/classes_start.py rename to learning-python/Ch2 - Basics/classes_start.py diff --git a/Ch2 - Basics/conditionals_finished.py b/learning-python/Ch2 - Basics/conditionals_finished.py similarity index 100% rename from Ch2 - Basics/conditionals_finished.py rename to learning-python/Ch2 - Basics/conditionals_finished.py diff --git a/Ch2 - Basics/conditionals_start.py b/learning-python/Ch2 - Basics/conditionals_start.py similarity index 100% rename from Ch2 - Basics/conditionals_start.py rename to learning-python/Ch2 - Basics/conditionals_start.py diff --git a/Ch2 - Basics/exceptions_finished.py b/learning-python/Ch2 - Basics/exceptions_finished.py similarity index 100% rename from Ch2 - Basics/exceptions_finished.py rename to learning-python/Ch2 - Basics/exceptions_finished.py diff --git a/Ch2 - Basics/exceptions_start.py b/learning-python/Ch2 - Basics/exceptions_start.py similarity index 100% rename from Ch2 - Basics/exceptions_start.py rename to learning-python/Ch2 - Basics/exceptions_start.py diff --git a/Ch2 - Basics/functions_finished.py b/learning-python/Ch2 - Basics/functions_finished.py similarity index 100% rename from Ch2 - Basics/functions_finished.py rename to learning-python/Ch2 - Basics/functions_finished.py diff --git a/Ch2 - Basics/functions_start.py b/learning-python/Ch2 - Basics/functions_start.py similarity index 100% rename from Ch2 - Basics/functions_start.py rename to learning-python/Ch2 - Basics/functions_start.py diff --git a/Ch2 - Basics/helloworld_finished.py b/learning-python/Ch2 - Basics/helloworld_finished.py similarity index 100% rename from Ch2 - Basics/helloworld_finished.py rename to learning-python/Ch2 - Basics/helloworld_finished.py diff --git a/Ch2 - Basics/helloworld_start.py b/learning-python/Ch2 - Basics/helloworld_start.py similarity index 100% rename from Ch2 - Basics/helloworld_start.py rename to learning-python/Ch2 - Basics/helloworld_start.py diff --git a/Ch2 - Basics/loops_finished.py b/learning-python/Ch2 - Basics/loops_finished.py similarity index 100% rename from Ch2 - Basics/loops_finished.py rename to learning-python/Ch2 - Basics/loops_finished.py diff --git a/Ch2 - Basics/loops_start.py b/learning-python/Ch2 - Basics/loops_start.py similarity index 100% rename from Ch2 - Basics/loops_start.py rename to learning-python/Ch2 - Basics/loops_start.py diff --git a/Ch2 - Basics/modules_finished.py b/learning-python/Ch2 - Basics/modules_finished.py similarity index 100% rename from Ch2 - Basics/modules_finished.py rename to learning-python/Ch2 - Basics/modules_finished.py diff --git a/Ch2 - Basics/modules_start.py b/learning-python/Ch2 - Basics/modules_start.py similarity index 100% rename from Ch2 - Basics/modules_start.py rename to learning-python/Ch2 - Basics/modules_start.py diff --git a/Ch2 - Basics/variables_finished.py b/learning-python/Ch2 - Basics/variables_finished.py similarity index 100% rename from Ch2 - Basics/variables_finished.py rename to learning-python/Ch2 - Basics/variables_finished.py diff --git a/Ch2 - Basics/variables_start.py b/learning-python/Ch2 - Basics/variables_start.py similarity index 100% rename from Ch2 - Basics/variables_start.py rename to learning-python/Ch2 - Basics/variables_start.py diff --git a/Ch3 - Files/archive.zip b/learning-python/Ch3 - Files/archive.zip similarity index 100% rename from Ch3 - Files/archive.zip rename to learning-python/Ch3 - Files/archive.zip diff --git a/Ch3 - Files/challenge.py b/learning-python/Ch3 - Files/challenge.py similarity index 100% rename from Ch3 - Files/challenge.py rename to learning-python/Ch3 - Files/challenge.py diff --git a/Ch3 - Files/challenge_solution.py b/learning-python/Ch3 - Files/challenge_solution.py similarity index 100% rename from Ch3 - Files/challenge_solution.py rename to learning-python/Ch3 - Files/challenge_solution.py diff --git a/Ch3 - Files/files_finished.py b/learning-python/Ch3 - Files/files_finished.py similarity index 100% rename from Ch3 - Files/files_finished.py rename to learning-python/Ch3 - Files/files_finished.py diff --git a/Ch3 - Files/files_start.py b/learning-python/Ch3 - Files/files_start.py similarity index 100% rename from Ch3 - Files/files_start.py rename to learning-python/Ch3 - Files/files_start.py diff --git a/Ch3 - Files/newfile.txt b/learning-python/Ch3 - Files/newfile.txt similarity index 100% rename from Ch3 - Files/newfile.txt rename to learning-python/Ch3 - Files/newfile.txt diff --git a/Ch3 - Files/ospathutils_finished.py b/learning-python/Ch3 - Files/ospathutils_finished.py similarity index 100% rename from Ch3 - Files/ospathutils_finished.py rename to learning-python/Ch3 - Files/ospathutils_finished.py diff --git a/Ch3 - Files/ospathutils_start.py b/learning-python/Ch3 - Files/ospathutils_start.py similarity index 100% rename from Ch3 - Files/ospathutils_start.py rename to learning-python/Ch3 - Files/ospathutils_start.py diff --git a/Ch3 - Files/results/results.txt b/learning-python/Ch3 - Files/results/results.txt similarity index 100% rename from Ch3 - Files/results/results.txt rename to learning-python/Ch3 - Files/results/results.txt diff --git a/Ch3 - Files/shell_finished.py b/learning-python/Ch3 - Files/shell_finished.py similarity index 100% rename from Ch3 - Files/shell_finished.py rename to learning-python/Ch3 - Files/shell_finished.py diff --git a/Ch3 - Files/shell_start.py b/learning-python/Ch3 - Files/shell_start.py similarity index 100% rename from Ch3 - Files/shell_start.py rename to learning-python/Ch3 - Files/shell_start.py diff --git a/Ch3 - Files/testzip.zip b/learning-python/Ch3 - Files/testzip.zip similarity index 100% rename from Ch3 - Files/testzip.zip rename to learning-python/Ch3 - Files/testzip.zip diff --git a/Ch3 - Files/textfile.txt.bak b/learning-python/Ch3 - Files/textfile.txt.bak similarity index 100% rename from Ch3 - Files/textfile.txt.bak rename to learning-python/Ch3 - Files/textfile.txt.bak diff --git a/Ch4 - Dates and Times/calendars_finished.py b/learning-python/Ch4 - Dates and Times/calendars_finished.py similarity index 100% rename from Ch4 - Dates and Times/calendars_finished.py rename to learning-python/Ch4 - Dates and Times/calendars_finished.py diff --git a/Ch4 - Dates and Times/calendars_start.py b/learning-python/Ch4 - Dates and Times/calendars_start.py similarity index 100% rename from Ch4 - Dates and Times/calendars_start.py rename to learning-python/Ch4 - Dates and Times/calendars_start.py diff --git a/Ch4 - Dates and Times/challenge_solution.py b/learning-python/Ch4 - Dates and Times/challenge_solution.py similarity index 100% rename from Ch4 - Dates and Times/challenge_solution.py rename to learning-python/Ch4 - Dates and Times/challenge_solution.py diff --git a/Ch4 - Dates and Times/challenge_start.py b/learning-python/Ch4 - Dates and Times/challenge_start.py similarity index 100% rename from Ch4 - Dates and Times/challenge_start.py rename to learning-python/Ch4 - Dates and Times/challenge_start.py diff --git a/Ch4 - Dates and Times/dates_finished.py b/learning-python/Ch4 - Dates and Times/dates_finished.py similarity index 100% rename from Ch4 - Dates and Times/dates_finished.py rename to learning-python/Ch4 - Dates and Times/dates_finished.py diff --git a/Ch4 - Dates and Times/dates_start.py b/learning-python/Ch4 - Dates and Times/dates_start.py similarity index 100% rename from Ch4 - Dates and Times/dates_start.py rename to learning-python/Ch4 - Dates and Times/dates_start.py diff --git a/Ch4 - Dates and Times/formatting_finished.py b/learning-python/Ch4 - Dates and Times/formatting_finished.py similarity index 100% rename from Ch4 - Dates and Times/formatting_finished.py rename to learning-python/Ch4 - Dates and Times/formatting_finished.py diff --git a/Ch4 - Dates and Times/formatting_start.py b/learning-python/Ch4 - Dates and Times/formatting_start.py similarity index 100% rename from Ch4 - Dates and Times/formatting_start.py rename to learning-python/Ch4 - Dates and Times/formatting_start.py diff --git a/Ch4 - Dates and Times/timedeltas_finished.py b/learning-python/Ch4 - Dates and Times/timedeltas_finished.py similarity index 100% rename from Ch4 - Dates and Times/timedeltas_finished.py rename to learning-python/Ch4 - Dates and Times/timedeltas_finished.py diff --git a/Ch4 - Dates and Times/timedeltas_start.py b/learning-python/Ch4 - Dates and Times/timedeltas_start.py similarity index 100% rename from Ch4 - Dates and Times/timedeltas_start.py rename to learning-python/Ch4 - Dates and Times/timedeltas_start.py diff --git a/Ch5 - Internet Data/htmlparsing_finished.py b/learning-python/Ch5 - Internet Data/htmlparsing_finished.py similarity index 100% rename from Ch5 - Internet Data/htmlparsing_finished.py rename to learning-python/Ch5 - Internet Data/htmlparsing_finished.py diff --git a/Ch5 - Internet Data/htmlparsing_start.py b/learning-python/Ch5 - Internet Data/htmlparsing_start.py similarity index 100% rename from Ch5 - Internet Data/htmlparsing_start.py rename to learning-python/Ch5 - Internet Data/htmlparsing_start.py diff --git a/Ch5 - Internet Data/inetdata_finished.py b/learning-python/Ch5 - Internet Data/inetdata_finished.py similarity index 100% rename from Ch5 - Internet Data/inetdata_finished.py rename to learning-python/Ch5 - Internet Data/inetdata_finished.py diff --git a/Ch5 - Internet Data/inetdata_start.py b/learning-python/Ch5 - Internet Data/inetdata_start.py similarity index 100% rename from Ch5 - Internet Data/inetdata_start.py rename to learning-python/Ch5 - Internet Data/inetdata_start.py diff --git a/Ch5 - Internet Data/jsondata_finished.py b/learning-python/Ch5 - Internet Data/jsondata_finished.py similarity index 100% rename from Ch5 - Internet Data/jsondata_finished.py rename to learning-python/Ch5 - Internet Data/jsondata_finished.py diff --git a/Ch5 - Internet Data/jsondata_start.py b/learning-python/Ch5 - Internet Data/jsondata_start.py similarity index 100% rename from Ch5 - Internet Data/jsondata_start.py rename to learning-python/Ch5 - Internet Data/jsondata_start.py diff --git a/Ch5 - Internet Data/samplehtml.html b/learning-python/Ch5 - Internet Data/samplehtml.html similarity index 100% rename from Ch5 - Internet Data/samplehtml.html rename to learning-python/Ch5 - Internet Data/samplehtml.html diff --git a/Ch5 - Internet Data/samplexml.xml b/learning-python/Ch5 - Internet Data/samplexml.xml similarity index 100% rename from Ch5 - Internet Data/samplexml.xml rename to learning-python/Ch5 - Internet Data/samplexml.xml diff --git a/Ch5 - Internet Data/xmlparsing_finished.py b/learning-python/Ch5 - Internet Data/xmlparsing_finished.py similarity index 100% rename from Ch5 - Internet Data/xmlparsing_finished.py rename to learning-python/Ch5 - Internet Data/xmlparsing_finished.py diff --git a/Ch5 - Internet Data/xmlparsing_start.py b/learning-python/Ch5 - Internet Data/xmlparsing_start.py similarity index 100% rename from Ch5 - Internet Data/xmlparsing_start.py rename to learning-python/Ch5 - Internet Data/xmlparsing_start.py diff --git a/LICENSE b/learning-python/LICENSE similarity index 100% rename from LICENSE rename to learning-python/LICENSE diff --git a/NOTICE b/learning-python/NOTICE similarity index 100% rename from NOTICE rename to learning-python/NOTICE diff --git a/README.md b/learning-python/README.md similarity index 100% rename from README.md rename to learning-python/README.md From 5b55ae3dbe2b9b6cc7eb65b3875b507d53328f0b Mon Sep 17 00:00:00 2001 From: Rob Anthony Curtis Date: Fri, 8 Jul 2022 17:16:00 -0700 Subject: [PATCH 17/20] Create README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..62563b3 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# python-challenges +Personal Coding Challenges in Python From 1740895ded0ff957899c9366e026fa3ec6547242 Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Fri, 8 Jul 2022 17:21:15 -0700 Subject: [PATCH 18/20] updated --- .DS_Store | Bin 0 -> 6148 bytes .github/CODEOWNERS | 3 --- .github/ISSUE_TEMPLATE.md | 34 ------------------------------- .github/PULL_REQUEST_TEMPLATE.md | 1 - .github/workflows/main.yml | 12 ----------- .gitignore | 4 ---- Ch3 - Files/.DS_Store | Bin 0 -> 6148 bytes 7 files changed, 54 deletions(-) create mode 100644 .DS_Store delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/ISSUE_TEMPLATE.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/main.yml delete mode 100644 .gitignore create mode 100644 Ch3 - Files/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..be6be0650a31ef3ca7e8ef273d5ee1f0b28a1560 GIT binary patch literal 6148 zcmeHK-D(p-6h4#2c9SX%Xi)@VZ@duGk~A$g7edUB5>P8{)eDt&w;RmDcDH0V291&2 z`v{7!pzq-W_$*%OcVv=fKQ&=FIud?0#WqGDIZmeZNdpAR-HmF`GxXz<8e9 zoMm)`c|z9MAe-vsQbNI8wh0&oi~@g~0{rcsr3Q6r3*YYK_j^Q1JB*LKF!qqc8$=!L z+IMO2h*l-9qItLR&4<*PV|_;E_209+L2{zk`r@60L6VkAUqxmqduDmXvhr5`T>iP! zjR#KZrv0Su_MY_$3bUsP`J>Dqtp$ePEV2pzk`%#PlCvg2lcog z`H8IKs0qu;S-FG4<>7FnyuDj4+LarXQPCb&w@O8Or&=A2a@NJG<(uup<5#bTZ$@w5 zOCd;L`;)e&@h5zMbBataon92i(FSRl{Hk^qx)F(A+_<-KZ4iB_zrF2Df}7sw;A>d z-9>hTT3|TTn$FJfJ5N6GGP3q$eK4kT=@xQ7PP|NCBaO z*6N~36Eg}J1^#OVcz>|b7;75G3gy;;PF?|kS%js*=f4Wfu{G8-jum1CCKMH@s6t;c zgrXyE>%5xAu|h>BAy-Bny|U0Z6d_kf+?MGiY6?wn6fg=*E3l-71wQ{pRIE*$7ijLc8JEtd1Hl=f=(aD(&3}{5}Gv3+3Wyo8pjF|ftf!7 NQU=o*1^%c4KL7__!0!M6 literal 0 HcmV?d00001 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 97f37e0..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,3 +0,0 @@ -# Codeowners for these exercise files: -# * (asterisk) deotes "all files and folders" -# Example: * @producer @instructor diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 20ff87d..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,34 +0,0 @@ - - -## Issue Overview - - -## Describe your environment - - -## Steps to Reproduce - -1. -2. -3. -4. - -## Expected Behavior - - -## Current Behavior - - -## Possible Solution - - -## Screenshots / Video - - -## Related Issues - diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 6ae59ec..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 1732566..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Copy To Branches -on: - workflow_dispatch: -jobs: - copy-to-branches: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Copy To Branches Action - uses: planetoftheweb/copy-to-branches@v1 diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4b64bc3..0000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.DS_Store -node_modules -.tmp -npm-debug.log diff --git a/Ch3 - Files/.DS_Store b/Ch3 - Files/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..f554c40641f9a91c9042028988f4e627ced82277 GIT binary patch literal 6148 zcmeHKOHRWu5PdFPR8*>p1cD7xPEd&(1XLERIRNxWTT#)9wER}ta|f=#`B=f5u?30S zqKXAVXr>xJ$MGA-ZyGxW;7%6(BcKVOMi;DZvshtrUwp|bp`}iA8e@z*4A8<8#!J1e z!4xnB{+a^v?$*)4EqWO7t^Im`XJ?aXuRED`*+Z6xV|wddjWu9T868ac8{h^*mKVq{ z<@Ew{#+tIVg&7{BNUu?(9bB=uM9COI>NoU^&oe-ORRnh!MQD^FWE@>)G+)Vmj<|J> zHo*O7gcf-Zn3tc~y+y2j&MxEJI_y0P^POz^{FPx8ZFg<7Z|9;pc`4*%C#WVl*+@x9 zE{YKvr3l}Su30E@>(oMWIM?-m7WRSYf22wlSxse8@i+tIcd74nlnKdSk#1!R3l=z?j$+@mfXEc6IKtg=~+b@^BjP7*K;n0w?Mn)6hmr@C;& zaGuWgB=k!I<{mvAE*w5w7} Date: Fri, 8 Jul 2022 17:26:51 -0700 Subject: [PATCH 19/20] Add files via upload From 71408d9d562b2eb0f7ebe7828e80744d88a5513e Mon Sep 17 00:00:00 2001 From: Rob Curtis Date: Fri, 8 Jul 2022 17:28:45 -0700 Subject: [PATCH 20/20] updated --- .../.github => .github}/CODEOWNERS | 0 .../.github => .github}/ISSUE_TEMPLATE.md | 0 .../PULL_REQUEST_TEMPLATE.md | 0 .../.github => .github}/workflows/main.yml | 0 learning-python/.gitignore => .gitignore | 0 .../CONTRIBUTING.md => CONTRIBUTING.md | 0 .../challenge_solution.py | 0 .../challenge_start.py | 0 .../classes_finished.py | 0 .../classes_start.py | 0 .../conditionals_finished.py | 0 .../conditionals_start.py | 0 .../exceptions_finished.py | 0 .../exceptions_start.py | 0 .../functions_finished.py | 0 .../functions_start.py | 0 .../helloworld_finished.py | 0 .../helloworld_start.py | 0 .../loops_finished.py | 0 .../loops_start.py | 0 .../modules_finished.py | 0 .../modules_start.py | 0 .../variables_finished.py | 0 .../variables_start.py | 0 Ch3 - Files/.DS_Store | Bin 6148 -> 0 bytes .../Ch3 - Files => Ch3 - Files}/archive.zip | Bin .../Ch3 - Files => Ch3 - Files}/challenge.py | 0 .../challenge_solution.py | 0 .../files_finished.py | 0 .../files_start.py | 0 .../Ch3 - Files => Ch3 - Files}/newfile.txt | 0 .../ospathutils_finished.py | 0 .../ospathutils_start.py | 0 .../results/results.txt | 0 .../shell_finished.py | 0 .../shell_start.py | 0 .../Ch3 - Files => Ch3 - Files}/testzip.zip | Bin .../textfile.txt.bak | 0 .../calendars_finished.py | 0 .../calendars_start.py | 0 .../challenge_solution.py | 0 .../challenge_start.py | 0 .../dates_finished.py | 0 .../dates_start.py | 0 .../formatting_finished.py | 0 .../formatting_start.py | 0 .../timedeltas_finished.py | 0 .../timedeltas_start.py | 0 .../htmlparsing_finished.py | 0 .../htmlparsing_start.py | 0 .../inetdata_finished.py | 0 .../inetdata_start.py | 0 .../jsondata_finished.py | 0 .../jsondata_start.py | 0 .../samplehtml.html | 0 .../samplexml.xml | 0 .../xmlparsing_finished.py | 0 .../xmlparsing_start.py | 0 learning-python/LICENSE => LICENSE | 0 learning-python/NOTICE => NOTICE | 0 README.md | 31 ++++++++++++++++-- learning-python/README.md | 29 ---------------- 62 files changed, 29 insertions(+), 31 deletions(-) rename {learning-python/.github => .github}/CODEOWNERS (100%) rename {learning-python/.github => .github}/ISSUE_TEMPLATE.md (100%) rename {learning-python/.github => .github}/PULL_REQUEST_TEMPLATE.md (100%) rename {learning-python/.github => .github}/workflows/main.yml (100%) rename learning-python/.gitignore => .gitignore (100%) rename learning-python/CONTRIBUTING.md => CONTRIBUTING.md (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/challenge_solution.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/challenge_start.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/classes_finished.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/classes_start.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/conditionals_finished.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/conditionals_start.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/exceptions_finished.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/exceptions_start.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/functions_finished.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/functions_start.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/helloworld_finished.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/helloworld_start.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/loops_finished.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/loops_start.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/modules_finished.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/modules_start.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/variables_finished.py (100%) rename {learning-python/Ch2 - Basics => Ch2 - Basics}/variables_start.py (100%) delete mode 100644 Ch3 - Files/.DS_Store rename {learning-python/Ch3 - Files => Ch3 - Files}/archive.zip (100%) rename {learning-python/Ch3 - Files => Ch3 - Files}/challenge.py (100%) rename {learning-python/Ch3 - Files => Ch3 - Files}/challenge_solution.py (100%) rename {learning-python/Ch3 - Files => Ch3 - Files}/files_finished.py (100%) rename {learning-python/Ch3 - Files => Ch3 - Files}/files_start.py (100%) rename {learning-python/Ch3 - Files => Ch3 - Files}/newfile.txt (100%) rename {learning-python/Ch3 - Files => Ch3 - Files}/ospathutils_finished.py (100%) rename {learning-python/Ch3 - Files => Ch3 - Files}/ospathutils_start.py (100%) rename {learning-python/Ch3 - Files => Ch3 - Files}/results/results.txt (100%) rename {learning-python/Ch3 - Files => Ch3 - Files}/shell_finished.py (100%) rename {learning-python/Ch3 - Files => Ch3 - Files}/shell_start.py (100%) rename {learning-python/Ch3 - Files => Ch3 - Files}/testzip.zip (100%) rename {learning-python/Ch3 - Files => Ch3 - Files}/textfile.txt.bak (100%) rename {learning-python/Ch4 - Dates and Times => Ch4 - Dates and Times}/calendars_finished.py (100%) rename {learning-python/Ch4 - Dates and Times => Ch4 - Dates and Times}/calendars_start.py (100%) rename {learning-python/Ch4 - Dates and Times => Ch4 - Dates and Times}/challenge_solution.py (100%) rename {learning-python/Ch4 - Dates and Times => Ch4 - Dates and Times}/challenge_start.py (100%) rename {learning-python/Ch4 - Dates and Times => Ch4 - Dates and Times}/dates_finished.py (100%) rename {learning-python/Ch4 - Dates and Times => Ch4 - Dates and Times}/dates_start.py (100%) rename {learning-python/Ch4 - Dates and Times => Ch4 - Dates and Times}/formatting_finished.py (100%) rename {learning-python/Ch4 - Dates and Times => Ch4 - Dates and Times}/formatting_start.py (100%) rename {learning-python/Ch4 - Dates and Times => Ch4 - Dates and Times}/timedeltas_finished.py (100%) rename {learning-python/Ch4 - Dates and Times => Ch4 - Dates and Times}/timedeltas_start.py (100%) rename {learning-python/Ch5 - Internet Data => Ch5 - Internet Data}/htmlparsing_finished.py (100%) rename {learning-python/Ch5 - Internet Data => Ch5 - Internet Data}/htmlparsing_start.py (100%) rename {learning-python/Ch5 - Internet Data => Ch5 - Internet Data}/inetdata_finished.py (100%) rename {learning-python/Ch5 - Internet Data => Ch5 - Internet Data}/inetdata_start.py (100%) rename {learning-python/Ch5 - Internet Data => Ch5 - Internet Data}/jsondata_finished.py (100%) rename {learning-python/Ch5 - Internet Data => Ch5 - Internet Data}/jsondata_start.py (100%) rename {learning-python/Ch5 - Internet Data => Ch5 - Internet Data}/samplehtml.html (100%) rename {learning-python/Ch5 - Internet Data => Ch5 - Internet Data}/samplexml.xml (100%) rename {learning-python/Ch5 - Internet Data => Ch5 - Internet Data}/xmlparsing_finished.py (100%) rename {learning-python/Ch5 - Internet Data => Ch5 - Internet Data}/xmlparsing_start.py (100%) rename learning-python/LICENSE => LICENSE (100%) rename learning-python/NOTICE => NOTICE (100%) delete mode 100644 learning-python/README.md diff --git a/learning-python/.github/CODEOWNERS b/.github/CODEOWNERS similarity index 100% rename from learning-python/.github/CODEOWNERS rename to .github/CODEOWNERS diff --git a/learning-python/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md similarity index 100% rename from learning-python/.github/ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE.md diff --git a/learning-python/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from learning-python/.github/PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md diff --git a/learning-python/.github/workflows/main.yml b/.github/workflows/main.yml similarity index 100% rename from learning-python/.github/workflows/main.yml rename to .github/workflows/main.yml diff --git a/learning-python/.gitignore b/.gitignore similarity index 100% rename from learning-python/.gitignore rename to .gitignore diff --git a/learning-python/CONTRIBUTING.md b/CONTRIBUTING.md similarity index 100% rename from learning-python/CONTRIBUTING.md rename to CONTRIBUTING.md diff --git a/learning-python/Ch2 - Basics/challenge_solution.py b/Ch2 - Basics/challenge_solution.py similarity index 100% rename from learning-python/Ch2 - Basics/challenge_solution.py rename to Ch2 - Basics/challenge_solution.py diff --git a/learning-python/Ch2 - Basics/challenge_start.py b/Ch2 - Basics/challenge_start.py similarity index 100% rename from learning-python/Ch2 - Basics/challenge_start.py rename to Ch2 - Basics/challenge_start.py diff --git a/learning-python/Ch2 - Basics/classes_finished.py b/Ch2 - Basics/classes_finished.py similarity index 100% rename from learning-python/Ch2 - Basics/classes_finished.py rename to Ch2 - Basics/classes_finished.py diff --git a/learning-python/Ch2 - Basics/classes_start.py b/Ch2 - Basics/classes_start.py similarity index 100% rename from learning-python/Ch2 - Basics/classes_start.py rename to Ch2 - Basics/classes_start.py diff --git a/learning-python/Ch2 - Basics/conditionals_finished.py b/Ch2 - Basics/conditionals_finished.py similarity index 100% rename from learning-python/Ch2 - Basics/conditionals_finished.py rename to Ch2 - Basics/conditionals_finished.py diff --git a/learning-python/Ch2 - Basics/conditionals_start.py b/Ch2 - Basics/conditionals_start.py similarity index 100% rename from learning-python/Ch2 - Basics/conditionals_start.py rename to Ch2 - Basics/conditionals_start.py diff --git a/learning-python/Ch2 - Basics/exceptions_finished.py b/Ch2 - Basics/exceptions_finished.py similarity index 100% rename from learning-python/Ch2 - Basics/exceptions_finished.py rename to Ch2 - Basics/exceptions_finished.py diff --git a/learning-python/Ch2 - Basics/exceptions_start.py b/Ch2 - Basics/exceptions_start.py similarity index 100% rename from learning-python/Ch2 - Basics/exceptions_start.py rename to Ch2 - Basics/exceptions_start.py diff --git a/learning-python/Ch2 - Basics/functions_finished.py b/Ch2 - Basics/functions_finished.py similarity index 100% rename from learning-python/Ch2 - Basics/functions_finished.py rename to Ch2 - Basics/functions_finished.py diff --git a/learning-python/Ch2 - Basics/functions_start.py b/Ch2 - Basics/functions_start.py similarity index 100% rename from learning-python/Ch2 - Basics/functions_start.py rename to Ch2 - Basics/functions_start.py diff --git a/learning-python/Ch2 - Basics/helloworld_finished.py b/Ch2 - Basics/helloworld_finished.py similarity index 100% rename from learning-python/Ch2 - Basics/helloworld_finished.py rename to Ch2 - Basics/helloworld_finished.py diff --git a/learning-python/Ch2 - Basics/helloworld_start.py b/Ch2 - Basics/helloworld_start.py similarity index 100% rename from learning-python/Ch2 - Basics/helloworld_start.py rename to Ch2 - Basics/helloworld_start.py diff --git a/learning-python/Ch2 - Basics/loops_finished.py b/Ch2 - Basics/loops_finished.py similarity index 100% rename from learning-python/Ch2 - Basics/loops_finished.py rename to Ch2 - Basics/loops_finished.py diff --git a/learning-python/Ch2 - Basics/loops_start.py b/Ch2 - Basics/loops_start.py similarity index 100% rename from learning-python/Ch2 - Basics/loops_start.py rename to Ch2 - Basics/loops_start.py diff --git a/learning-python/Ch2 - Basics/modules_finished.py b/Ch2 - Basics/modules_finished.py similarity index 100% rename from learning-python/Ch2 - Basics/modules_finished.py rename to Ch2 - Basics/modules_finished.py diff --git a/learning-python/Ch2 - Basics/modules_start.py b/Ch2 - Basics/modules_start.py similarity index 100% rename from learning-python/Ch2 - Basics/modules_start.py rename to Ch2 - Basics/modules_start.py diff --git a/learning-python/Ch2 - Basics/variables_finished.py b/Ch2 - Basics/variables_finished.py similarity index 100% rename from learning-python/Ch2 - Basics/variables_finished.py rename to Ch2 - Basics/variables_finished.py diff --git a/learning-python/Ch2 - Basics/variables_start.py b/Ch2 - Basics/variables_start.py similarity index 100% rename from learning-python/Ch2 - Basics/variables_start.py rename to Ch2 - Basics/variables_start.py diff --git a/Ch3 - Files/.DS_Store b/Ch3 - Files/.DS_Store deleted file mode 100644 index f554c40641f9a91c9042028988f4e627ced82277..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKOHRWu5PdFPR8*>p1cD7xPEd&(1XLERIRNxWTT#)9wER}ta|f=#`B=f5u?30S zqKXAVXr>xJ$MGA-ZyGxW;7%6(BcKVOMi;DZvshtrUwp|bp`}iA8e@z*4A8<8#!J1e z!4xnB{+a^v?$*)4EqWO7t^Im`XJ?aXuRED`*+Z6xV|wddjWu9T868ac8{h^*mKVq{ z<@Ew{#+tIVg&7{BNUu?(9bB=uM9COI>NoU^&oe-ORRnh!MQD^FWE@>)G+)Vmj<|J> zHo*O7gcf-Zn3tc~y+y2j&MxEJI_y0P^POz^{FPx8ZFg<7Z|9;pc`4*%C#WVl*+@x9 zE{YKvr3l}Su30E@>(oMWIM?-m7WRSYf22wlSxse8@i+tIcd74nlnKdSk#1!R3l=z?j$+@mfXEc6IKtg=~+b@^BjP7*K;n0w?Mn)6hmr@C;& zaGuWgB=k!I<{mvAE*w5w7}