diff --git a/.gitignore b/.gitignore index 1004750..5a914a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -out.txt -Python3HardWay.pdf +3exercises/out.txt +Resources/Python3HardWay.pdf diff --git a/YO5.txt b/3exercises/YO5.txt similarity index 100% rename from YO5.txt rename to 3exercises/YO5.txt diff --git a/YO6.txt b/3exercises/YO6.txt similarity index 100% rename from YO6.txt rename to 3exercises/YO6.txt diff --git a/ex10-breakallthngs.py b/3exercises/ex10-breakallthngs.py similarity index 100% rename from ex10-breakallthngs.py rename to 3exercises/ex10-breakallthngs.py diff --git a/ex10.py b/3exercises/ex10.py similarity index 100% rename from ex10.py rename to 3exercises/ex10.py diff --git a/ex11_Fun.py b/3exercises/ex11_Fun.py similarity index 100% rename from ex11_Fun.py rename to 3exercises/ex11_Fun.py diff --git a/ex12_ss.py b/3exercises/ex12_ss.py similarity index 100% rename from ex12_ss.py rename to 3exercises/ex12_ss.py diff --git a/ex13.py b/3exercises/ex13.py similarity index 100% rename from ex13.py rename to 3exercises/ex13.py diff --git a/ex14.py b/3exercises/ex14.py similarity index 100% rename from ex14.py rename to 3exercises/ex14.py diff --git a/ex15.py b/3exercises/ex15.py similarity index 100% rename from ex15.py rename to 3exercises/ex15.py diff --git a/ex15_sample.txt b/3exercises/ex15_sample.txt similarity index 100% rename from ex15_sample.txt rename to 3exercises/ex15_sample.txt diff --git a/ex16.py b/3exercises/ex16.py similarity index 100% rename from ex16.py rename to 3exercises/ex16.py diff --git a/ex17.py b/3exercises/ex17.py similarity index 100% rename from ex17.py rename to 3exercises/ex17.py diff --git a/ex18.py b/3exercises/ex18.py similarity index 100% rename from ex18.py rename to 3exercises/ex18.py diff --git a/ex19.py b/3exercises/ex19.py similarity index 100% rename from ex19.py rename to 3exercises/ex19.py diff --git a/ex7-dots.py b/3exercises/ex7-dots.py similarity index 100% rename from ex7-dots.py rename to 3exercises/ex7-dots.py diff --git a/ex8.py b/3exercises/ex8.py similarity index 100% rename from ex8.py rename to 3exercises/ex8.py diff --git a/ex9-mod.py b/3exercises/ex9-mod.py similarity index 100% rename from ex9-mod.py rename to 3exercises/ex9-mod.py diff --git a/ex9.py b/3exercises/ex9.py similarity index 100% rename from ex9.py rename to 3exercises/ex9.py diff --git a/3exercises/passing-parmseasy.py b/3exercises/passing-parmseasy.py new file mode 100644 index 0000000..6abf7ac --- /dev/null +++ b/3exercises/passing-parmseasy.py @@ -0,0 +1,11 @@ +def function1(arg): + + print(arg) + +def function2(argument): + + print(argument) + argument = argument + ". HI!" + function1(argument) + +function2("Hello World") diff --git a/Codecademy.md b/Codecademy.md new file mode 100644 index 0000000..d9acca4 --- /dev/null +++ b/Codecademy.md @@ -0,0 +1,11 @@ +# Object-oriented + +"The main goal of an object oriented language is to make code reusable – we do this through the use of classes and objects. If we want to design a new type of car, we can start with what they all have in common: wheels, seats, a frame. Now that we’ve determined what cars have in common, we can more easily implement any type of car we want by starting from that basic blueprint." + +https://discuss.codecademy.com/t/what-does-it-mean-that-python-is-an-object-oriented-language/297314 + +# Errors + +print("With mismatched quotes will cause a SyntaxError") + +print("Without quotes will cause a NameError") diff --git a/bank.py b/Misc. learning/bank.py similarity index 100% rename from bank.py rename to Misc. learning/bank.py diff --git a/Misc. learning/pass.py b/Misc. learning/pass.py new file mode 100644 index 0000000..50b5d3a --- /dev/null +++ b/Misc. learning/pass.py @@ -0,0 +1,11 @@ +def funciton1(args): { + print(args) +} + +def function2(argument): { + print(argument) + #argument2 = argument + "hi" + function1(args) +} + +function2("Hello World") diff --git a/passing-parms.py b/Misc. learning/passing-parms.py similarity index 100% rename from passing-parms.py rename to Misc. learning/passing-parms.py diff --git a/python-learning.py b/Misc. learning/python-learning.py similarity index 100% rename from python-learning.py rename to Misc. learning/python-learning.py diff --git a/python-parse-html.py b/Misc. learning/python-parse-html.py similarity index 100% rename from python-parse-html.py rename to Misc. learning/python-parse-html.py diff --git a/python-web.py b/Misc. learning/python-web.py similarity index 100% rename from python-web.py rename to Misc. learning/python-web.py diff --git a/README.md b/README.md index 36c2519..a4cc585 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,6 @@ These are an assortment of my Python scripts, most of them while following "Python The Hard Way", some while not. -The most interesting (in my opinion) are [The Python Caeser Cipher Helper](Caeser-Cipher), [The Dots of Death (Use with caution)](ex7-dots.py) and the latest is in Alpha state and is sadly lacking parameters which makes testing hard: [Sermon-Upload](Sermon-Upload) +The most interesting (in my opinion) are [The Python Caeser Cipher Helper](Caeser-Cipher), [The Dots of Death (Use with caution)](3exercises/ex7-dots.py) and the latest is in Alpha state and is sadly lacking parameters which makes testing hard: [Sermon-Upload](Sermon-Upload) -You can also find out if you're a giant here (Read the comments): [Short and Tall](ex11_Fun.py) +You can also find out if you're a giant here (Read the comments): [Short and Tall](3exercises/ex11_Fun.py) diff --git a/install-dbus-python.sh b/Resources/install-dbus-python.sh similarity index 100% rename from install-dbus-python.sh rename to Resources/install-dbus-python.sh diff --git a/install-python.md b/Resources/install-python.md similarity index 100% rename from install-python.md rename to Resources/install-python.md diff --git a/Resources/passing-parmseasy.md b/Resources/passing-parmseasy.md new file mode 100644 index 0000000..5516260 --- /dev/null +++ b/Resources/passing-parmseasy.md @@ -0,0 +1,17 @@ + + +``` +def function1(arg): + + print(arg) + +def function2(argument): + + print(argument) + argument = argument + ". HI!" + function1(argument) + +function2("Hello World") +``` + +So, what are we doing? We're giving function2 an argument that it prints, modifies and sends it to function1. Function1 then prints the new argument that was passed to it by funciton2 and we're done. If you have any questions, hit me up in the comments.