From 780f5c7c35c3919b101c2a16d8653205990b9aa3 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 12 Oct 2017 10:34:43 -0400 Subject: [PATCH 001/206] Update and rename Computer to Computer.py --- Computer => Computer.py | 1 - 1 file changed, 1 deletion(-) rename Computer => Computer.py (98%) diff --git a/Computer b/Computer.py similarity index 98% rename from Computer rename to Computer.py index 96509d8..bdf1ea5 100644 --- a/Computer +++ b/Computer.py @@ -36,7 +36,6 @@ while Searchingin == 0: if Computer == 3: if inp == "Internet": - sleep(1.0) print("What do you want to search for?") Searching = input() print("Searching for : "+Searching) From 1f1cbc9211d4251108a46bbcc5893fa8c2db4cad Mon Sep 17 00:00:00 2001 From: pythoncatcoder Date: Thu, 12 Oct 2017 10:48:57 -0400 Subject: [PATCH 002/206] Create pythonputer --- Tutorials/pythonputer | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Tutorials/pythonputer diff --git a/Tutorials/pythonputer b/Tutorials/pythonputer new file mode 100644 index 0000000..087089a --- /dev/null +++ b/Tutorials/pythonputer @@ -0,0 +1,10 @@ +import time + + +print("Would you like to start your computer?") +start = input("y/n:") +if start == "y": + print("Starting computer") + time.sleep(3) + print("LOADING...") + From 2ecf34adff06fd5b8c127a7aceb017713afb721c Mon Sep 17 00:00:00 2001 From: pythoncatcoder Date: Thu, 12 Oct 2017 10:54:38 -0400 Subject: [PATCH 003/206] Update pythonputer --- Tutorials/pythonputer | 1 + 1 file changed, 1 insertion(+) diff --git a/Tutorials/pythonputer b/Tutorials/pythonputer index 087089a..950107e 100644 --- a/Tutorials/pythonputer +++ b/Tutorials/pythonputer @@ -7,4 +7,5 @@ if start == "y": print("Starting computer") time.sleep(3) print("LOADING...") + time.sleep(5) From a959a326403736515acce68a41ddfadecce2a0f1 Mon Sep 17 00:00:00 2001 From: pythoncatcoder Date: Thu, 12 Oct 2017 13:12:19 -0400 Subject: [PATCH 004/206] Update pythonputer this script does not do anything...yet --- Tutorials/pythonputer | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/Tutorials/pythonputer b/Tutorials/pythonputer index 950107e..1c850c1 100644 --- a/Tutorials/pythonputer +++ b/Tutorials/pythonputer @@ -1,11 +1,36 @@ import time +import random -print("Would you like to start your computer?") -start = input("y/n:") -if start == "y": - print("Starting computer") - time.sleep(3) - print("LOADING...") - time.sleep(5) + +def start(): + print("Do you want to start your computer?") + choosest = input("y/n:") + +def starting(): + if choosest == "y": + print("Starting") + time.sleep(5) + +def chlog(): + print("Do you want to log in or continue as guest?") + chlogg = input("[1]log in/[2]guest:") + +def guest(): + print("Loggint in as guest...") + +def login(): + print("To continue, you must authenticate yourself. Please type in your username and password.") + print("If you would like to go back, type in [back] for the username.") + user = input("Username:") + pass = input("Pass:") + +def ifguest(): + if user == "back": + chlog() + +def admin(): + if user == "admin": + if pass == "admin": + print("Logging in succedded") From 89f87744f5e2ff289633e0cc368185fc0f181873 Mon Sep 17 00:00:00 2001 From: pythoncatcoder Date: Thu, 12 Oct 2017 13:25:35 -0400 Subject: [PATCH 005/206] Update pythonputer --- Tutorials/pythonputer | 92 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) diff --git a/Tutorials/pythonputer b/Tutorials/pythonputer index 1c850c1..69678ae 100644 --- a/Tutorials/pythonputer +++ b/Tutorials/pythonputer @@ -24,7 +24,7 @@ def login(): print("To continue, you must authenticate yourself. Please type in your username and password.") print("If you would like to go back, type in [back] for the username.") user = input("Username:") - pass = input("Pass:") + passw = input("Pass:") def ifguest(): if user == "back": @@ -34,3 +34,93 @@ def admin(): if user == "admin": if pass == "admin": print("Logging in succedded") + adminuser() +def adminuser(): + print("Welcome back, Administrator!") + + +def user1(): + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 9db62ea13d171102c0a03217848a2a7a7409fc67 Mon Sep 17 00:00:00 2001 From: pythoncatcoder Date: Thu, 12 Oct 2017 14:02:42 -0400 Subject: [PATCH 006/206] Update pythonputer --- Tutorials/pythonputer | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Tutorials/pythonputer b/Tutorials/pythonputer index 69678ae..d92980e 100644 --- a/Tutorials/pythonputer +++ b/Tutorials/pythonputer @@ -32,20 +32,28 @@ def ifguest(): def admin(): if user == "admin": - if pass == "admin": + if passw == "admin": print("Logging in succedded") adminuser() def adminuser(): print("Welcome back, Administrator!") - def user1(): + if user == "yascalawag123": + if passw == "breh": + print("Welcome back, yalandlubber27!") - - - +start() +starting() +chlog() +guest() +login() +ifguest() +admin() +adminuser() +user1() From 62548a2ed44b4b5525fab3bf29b438693ba10905 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 12 Oct 2017 15:26:30 -0400 Subject: [PATCH 007/206] Create Computer.py --- Projects/Computer.py | 84 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Projects/Computer.py diff --git a/Projects/Computer.py b/Projects/Computer.py new file mode 100644 index 0000000..bdf1ea5 --- /dev/null +++ b/Projects/Computer.py @@ -0,0 +1,84 @@ +from time import sleep + +Username = "" +Password = "" +attempts = 0 + +while Username != "USER" or Password != "PASS": + if attempts >0: + print ("Wrong username or password") + attempts += 1 + print("What's Username?") + Username = input() + print("Whats Password?") + Password = input() + +if Username == "USER" and Password == "PASS": + print("Starting Computer") + sleep(1.0) + print("Loading...") + sleep(1.0) + Computer = 1 + Computer_help = 0 + while Computer == 1: + print("Loading...") + Computer_help += 1 + sleep(1.0) + if Computer_help == 4: + Computer = 2 + while Computer == 2: + print("Enter Internet") + inp = input() + if inp == "Internet": + Internet_help = 1 + Computer = 3 + Searchingin = 0 + while Searchingin == 0: + if Computer == 3: + if inp == "Internet": + print("What do you want to search for?") + Searching = input() + print("Searching for : "+Searching) + if Searching == "Google": + sleep(1.0) + print("Going to Google") + Searchingin = 0 + elif Searching == "List": + sleep(1.0) + print("Google, Minecraft, Gmail, Shut Down") + Searchingin = 0 + elif Searching == "Shut Down": + sleep(1.0) + print("Shutting Down") + Searchingin = 1 + elif Searching == "Minecraft": + sleep(1.0) + print("Opening Minecraft") + Searchingin = 0 + elif Searching == "Gmail": + sleep(1.0) + print("Opening gmail") + gmail = 1 + Searchingin = 0 + if gmail == 1: + sleep(1.0) + print("Enter Send or check") + gmail = input() + if gmail == "Send": + print("What's email?") + whatsemail = input() + print("What's name?") + whatsname = input() + print("What's message") + whatsmessage = input() + print ("Sending to:",whatsemail,"Name is:",whatsname,"Message:",whatsmessage) + else: + sleep(1.0) + print("No results found, click enter to try again") + Searchinginput = input() + if Searchingin == "No results found, click enter to try again": + Searchingin = 0 + while Searchingin == 1: + print("Shutting Down") + Searchingin = 0 + From ec3d523bb9cc956bda52a05033c5c134d50ae1d2 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 12 Oct 2017 15:27:26 -0400 Subject: [PATCH 008/206] Delete Computer.py --- Computer.py | 84 ----------------------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 Computer.py diff --git a/Computer.py b/Computer.py deleted file mode 100644 index bdf1ea5..0000000 --- a/Computer.py +++ /dev/null @@ -1,84 +0,0 @@ -from time import sleep - -Username = "" -Password = "" -attempts = 0 - -while Username != "USER" or Password != "PASS": - if attempts >0: - print ("Wrong username or password") - attempts += 1 - print("What's Username?") - Username = input() - print("Whats Password?") - Password = input() - -if Username == "USER" and Password == "PASS": - print("Starting Computer") - sleep(1.0) - print("Loading...") - sleep(1.0) - Computer = 1 - Computer_help = 0 - while Computer == 1: - print("Loading...") - Computer_help += 1 - sleep(1.0) - if Computer_help == 4: - Computer = 2 - while Computer == 2: - print("Enter Internet") - inp = input() - if inp == "Internet": - Internet_help = 1 - Computer = 3 - Searchingin = 0 - while Searchingin == 0: - if Computer == 3: - if inp == "Internet": - print("What do you want to search for?") - Searching = input() - print("Searching for : "+Searching) - if Searching == "Google": - sleep(1.0) - print("Going to Google") - Searchingin = 0 - elif Searching == "List": - sleep(1.0) - print("Google, Minecraft, Gmail, Shut Down") - Searchingin = 0 - elif Searching == "Shut Down": - sleep(1.0) - print("Shutting Down") - Searchingin = 1 - elif Searching == "Minecraft": - sleep(1.0) - print("Opening Minecraft") - Searchingin = 0 - elif Searching == "Gmail": - sleep(1.0) - print("Opening gmail") - gmail = 1 - Searchingin = 0 - if gmail == 1: - sleep(1.0) - print("Enter Send or check") - gmail = input() - if gmail == "Send": - print("What's email?") - whatsemail = input() - print("What's name?") - whatsname = input() - print("What's message") - whatsmessage = input() - print ("Sending to:",whatsemail,"Name is:",whatsname,"Message:",whatsmessage) - else: - sleep(1.0) - print("No results found, click enter to try again") - Searchinginput = input() - if Searchingin == "No results found, click enter to try again": - Searchingin = 0 - while Searchingin == 1: - print("Shutting Down") - Searchingin = 0 - From 07463e319337d2838be4e270bc9c1a2a8e10c973 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 12 Oct 2017 16:32:04 -0400 Subject: [PATCH 009/206] Moved pythonputer --- Tutorials/pythonputer => Projects/pythonputer.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/pythonputer => Projects/pythonputer.py (100%) diff --git a/Tutorials/pythonputer b/Projects/pythonputer.py similarity index 100% rename from Tutorials/pythonputer rename to Projects/pythonputer.py From 6e3ee70c21ba7fee83f366a416444f58400759fb Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 12:17:44 -0400 Subject: [PATCH 010/206] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ded5ee4..4dd5aad 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# Python +If you want to edit tutorials, message me on discord. Compile on https://repl.it. More soon... From 220fb26f1a5777ec955a7d3ff322b477dacb5990 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 12:23:53 -0400 Subject: [PATCH 011/206] Update README.md --- README.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 4dd5aad..5d8a60e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # Python -If you want to edit tutorials, message me on discord. -Compile on https://repl.it. - -More soon... - -https://repl.it/M4Sz/0 - Computer - -http://jackofallsyntax.com/wp-content/uploads/2015/04/CodeHeader-1920x1200.jpg for picture +## Helping +If you want to edit tutorials, message me (Mosrod) on discord. +My discord info is on my github profile page. +## Compilers + * Python (https://www.python.org) + * Repl.it (https://repl.it/languages/python3) + * Trinket (https://trinket.io) From 08e62bb5bcacfa76b98a857cc34a62ddeb853d81 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 12:24:11 -0400 Subject: [PATCH 012/206] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d8a60e..09aeb01 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Python ## Helping -If you want to edit tutorials, message me (Mosrod) on discord. +If you want to edit tutorials, message me (@Mosrod) on discord. My discord info is on my github profile page. ## Compilers * Python (https://www.python.org) From 126b869f6aff4e26ea32faec986234c3288ff729 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 12:24:23 -0400 Subject: [PATCH 013/206] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09aeb01..3d3f3de 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Python ## Helping -If you want to edit tutorials, message me (@Mosrod) on discord. +If you want to edit tutorials, message me ( @Mosrod ) on discord. My discord info is on my github profile page. ## Compilers * Python (https://www.python.org) From 64d3e1d9c4ec7b72d96fb6c8cb07d62a8128695d Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 12:24:40 -0400 Subject: [PATCH 014/206] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d3f3de..5d8a60e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Python ## Helping -If you want to edit tutorials, message me ( @Mosrod ) on discord. +If you want to edit tutorials, message me (Mosrod) on discord. My discord info is on my github profile page. ## Compilers * Python (https://www.python.org) From 4d341519e4899c222569d229a675f4b9446cc4bd Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 12:25:59 -0400 Subject: [PATCH 015/206] Rename pythonputer.py to PythonPuter.py --- Projects/{pythonputer.py => PythonPuter.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Projects/{pythonputer.py => PythonPuter.py} (100%) diff --git a/Projects/pythonputer.py b/Projects/PythonPuter.py similarity index 100% rename from Projects/pythonputer.py rename to Projects/PythonPuter.py From 288683ca17471a881001253b3ebb21b03cbe7dc3 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 15:09:25 -0400 Subject: [PATCH 016/206] Update PythonPuter.py --- Projects/PythonPuter.py | 77 ----------------------------------------- 1 file changed, 77 deletions(-) diff --git a/Projects/PythonPuter.py b/Projects/PythonPuter.py index d92980e..e4e8f81 100644 --- a/Projects/PythonPuter.py +++ b/Projects/PythonPuter.py @@ -55,80 +55,3 @@ def user1(): adminuser() user1() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 304627978d758c8484ff1ea63f57a7f621e48f02 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 16:42:48 -0400 Subject: [PATCH 017/206] Create PythonPuter --- Projects/PythonPuter | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Projects/PythonPuter diff --git a/Projects/PythonPuter b/Projects/PythonPuter new file mode 100644 index 0000000..74b842b --- /dev/null +++ b/Projects/PythonPuter @@ -0,0 +1,30 @@ +from time import sleep +import sys +import random + +# Start Computer + +print("Do you want to start the compyter?") +startcomputer = input("y/n:") +if startcomputer == "y": + text = "Loading ..........." + for character in text: + sys.stdout.write(character) + sleep(0.2) + login = 1 + +# Login +if login == 1: + print("\n" * 1) + print("Starting Computer") + Username = input("Username: ") + Password = input("Password: ") + +#Login Check +attempts = 1 +while Username != "ADMIN" or Password !="ADMIN": + if attempts >0: + print("Wrong Username or Password") + attempts += 1 + Username = input("Username: ") + Password = input("Password: ") From 2427b4fd0314c0812aa07574eb9c4825c3a0f909 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 16:43:02 -0400 Subject: [PATCH 018/206] Delete PythonPuter --- Projects/PythonPuter | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 Projects/PythonPuter diff --git a/Projects/PythonPuter b/Projects/PythonPuter deleted file mode 100644 index 74b842b..0000000 --- a/Projects/PythonPuter +++ /dev/null @@ -1,30 +0,0 @@ -from time import sleep -import sys -import random - -# Start Computer - -print("Do you want to start the compyter?") -startcomputer = input("y/n:") -if startcomputer == "y": - text = "Loading ..........." - for character in text: - sys.stdout.write(character) - sleep(0.2) - login = 1 - -# Login -if login == 1: - print("\n" * 1) - print("Starting Computer") - Username = input("Username: ") - Password = input("Password: ") - -#Login Check -attempts = 1 -while Username != "ADMIN" or Password !="ADMIN": - if attempts >0: - print("Wrong Username or Password") - attempts += 1 - Username = input("Username: ") - Password = input("Password: ") From 948e274480a64014b48541bf5a300813468f15f0 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 16:43:18 -0400 Subject: [PATCH 019/206] Update PythonPuter.py --- Projects/PythonPuter.py | 81 ++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 54 deletions(-) diff --git a/Projects/PythonPuter.py b/Projects/PythonPuter.py index e4e8f81..74b842b 100644 --- a/Projects/PythonPuter.py +++ b/Projects/PythonPuter.py @@ -1,57 +1,30 @@ -import time +from time import sleep +import sys import random - - -def start(): - print("Do you want to start your computer?") - choosest = input("y/n:") - -def starting(): - if choosest == "y": - print("Starting") - time.sleep(5) - -def chlog(): - print("Do you want to log in or continue as guest?") - chlogg = input("[1]log in/[2]guest:") +# Start Computer + +print("Do you want to start the compyter?") +startcomputer = input("y/n:") +if startcomputer == "y": + text = "Loading ..........." + for character in text: + sys.stdout.write(character) + sleep(0.2) + login = 1 + +# Login +if login == 1: + print("\n" * 1) + print("Starting Computer") + Username = input("Username: ") + Password = input("Password: ") -def guest(): - print("Loggint in as guest...") - - -def login(): - print("To continue, you must authenticate yourself. Please type in your username and password.") - print("If you would like to go back, type in [back] for the username.") - user = input("Username:") - passw = input("Pass:") - -def ifguest(): - if user == "back": - chlog() - -def admin(): - if user == "admin": - if passw == "admin": - print("Logging in succedded") - adminuser() -def adminuser(): - print("Welcome back, Administrator!") - -def user1(): - if user == "yascalawag123": - if passw == "breh": - print("Welcome back, yalandlubber27!") - - - -start() -starting() -chlog() -guest() -login() -ifguest() -admin() -adminuser() -user1() - +#Login Check +attempts = 1 +while Username != "ADMIN" or Password !="ADMIN": + if attempts >0: + print("Wrong Username or Password") + attempts += 1 + Username = input("Username: ") + Password = input("Password: ") From 8d384879138921790b4d8034b21f3f8269947d8a Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 16:49:39 -0400 Subject: [PATCH 020/206] Update PythonPuter.py --- Projects/PythonPuter.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Projects/PythonPuter.py b/Projects/PythonPuter.py index 74b842b..08aa1d7 100644 --- a/Projects/PythonPuter.py +++ b/Projects/PythonPuter.py @@ -4,15 +4,16 @@ # Start Computer -print("Do you want to start the compyter?") -startcomputer = input("y/n:") +print("Do you want to start the computer?") +startcomputer = input("[y]/[n]:") if startcomputer == "y": text = "Loading ..........." for character in text: sys.stdout.write(character) sleep(0.2) login = 1 - +if startcomputer == "n": + print("Shutting Down") # Login if login == 1: print("\n" * 1) @@ -20,11 +21,11 @@ Username = input("Username: ") Password = input("Password: ") -#Login Check +# Login Check attempts = 1 while Username != "ADMIN" or Password !="ADMIN": if attempts >0: print("Wrong Username or Password") attempts += 1 - Username = input("Username: ") - Password = input("Password: ") + Username = input("Username:") + Password = input("Password:") From 77b00990a8e3f5674335e9d11a08b545b77c3497 Mon Sep 17 00:00:00 2001 From: pythoncatcoder Date: Fri, 13 Oct 2017 16:56:15 -0400 Subject: [PATCH 021/206] Create PythonPuterBeta --- Projects/PythonPuterBeta | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Projects/PythonPuterBeta diff --git a/Projects/PythonPuterBeta b/Projects/PythonPuterBeta new file mode 100644 index 0000000..686a1f7 --- /dev/null +++ b/Projects/PythonPuterBeta @@ -0,0 +1,38 @@ +from time import sleep +import sys +import random +hi = "0" +# Start Computer + +print("Do you want to start the computer?") +startcomputer = input("[y]/[n]:") +if startcomputer == "y": + text = "Loading ..........." + for character in text: + sys.stdout.write(character) + sleep(0.2) + login = 1 +if startcomputer == "n": + print("Shutting Down") +# Login +if login == 1: + print("\n" * 1) + print("Starting Computer") + Username = input("Username: ") + Password = input("Password: ") + +# Login Check +attempts = 1 +while Username != "ADMIN" or Password !="ADMIN": + if attempts <3: + print("Wrong Username or Password") + attempts += 1 + Username = input("Username:") + Password = input("Password:") + else: + if hi == "0": + print("Allowed attempts exceeded") + hi = hi + "1" + quit() + + From 079b18fa4a504759befa0730233f381595628b83 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 16:56:44 -0400 Subject: [PATCH 022/206] Update PythonPuter.py --- Projects/PythonPuter.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Projects/PythonPuter.py b/Projects/PythonPuter.py index 08aa1d7..d5a8feb 100644 --- a/Projects/PythonPuter.py +++ b/Projects/PythonPuter.py @@ -2,6 +2,11 @@ import sys import random +# Variables +login = 0 +Username = 0 +Password = 0 +startcomputer = 0 # Start Computer print("Do you want to start the computer?") @@ -12,14 +17,17 @@ sys.stdout.write(character) sleep(0.2) login = 1 + if startcomputer == "n": print("Shutting Down") + quit() + # Login if login == 1: print("\n" * 1) print("Starting Computer") - Username = input("Username: ") - Password = input("Password: ") + Username = input("Username:") + Password = input("Password:") # Login Check attempts = 1 From 31868247c118a328fe1956dac240f3011904e31a Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 17:21:30 -0400 Subject: [PATCH 023/206] Update PythonPuter.py --- Projects/PythonPuter.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Projects/PythonPuter.py b/Projects/PythonPuter.py index d5a8feb..8a386e0 100644 --- a/Projects/PythonPuter.py +++ b/Projects/PythonPuter.py @@ -7,8 +7,8 @@ Username = 0 Password = 0 startcomputer = 0 -# Start Computer +# Start Computer print("Do you want to start the computer?") startcomputer = input("[y]/[n]:") if startcomputer == "y": @@ -26,10 +26,10 @@ if login == 1: print("\n" * 1) print("Starting Computer") - Username = input("Username:") + Username = input("Username:") Password = input("Password:") -# Login Check +# Wrong Login Check attempts = 1 while Username != "ADMIN" or Password !="ADMIN": if attempts >0: @@ -37,3 +37,7 @@ attempts += 1 Username = input("Username:") Password = input("Password:") + +# Correct Login Check +if Username == "ADMIN" and Password == "ADMIN": + print("Successfully Logged In") From 7edc8b1581040c0e1f6d2d1b380e9578f9faaf42 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 18:04:49 -0400 Subject: [PATCH 024/206] Update PythonPuter.py --- Projects/PythonPuter.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Projects/PythonPuter.py b/Projects/PythonPuter.py index 8a386e0..5fc615e 100644 --- a/Projects/PythonPuter.py +++ b/Projects/PythonPuter.py @@ -7,7 +7,7 @@ Username = 0 Password = 0 startcomputer = 0 - +appopen = 0 # Start Computer print("Do you want to start the computer?") startcomputer = input("[y]/[n]:") @@ -41,3 +41,29 @@ # Correct Login Check if Username == "ADMIN" and Password == "ADMIN": print("Successfully Logged In") + sleep(0.2) + + # Opening Apps + while appopen == 0: + print("What application do you want to open?") + app = input() + + # Chrome + if app == "email": + print("Opening Email") + emailchoice = input() + if emailchoice == "send" + print("What email address?") + emailaddress = input() + appopen = 1 + + # Application not found + else: + print("Application not found") + appopen = 0 + + # Application closed + if appopen == 1: + print("Application Closed") + appopen = 0 + From bba7517f0d92e7b271228108efae7f91a164d386 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 18:05:22 -0400 Subject: [PATCH 025/206] Update PythonPuter.py --- Projects/PythonPuter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/PythonPuter.py b/Projects/PythonPuter.py index 5fc615e..c361390 100644 --- a/Projects/PythonPuter.py +++ b/Projects/PythonPuter.py @@ -52,7 +52,7 @@ if app == "email": print("Opening Email") emailchoice = input() - if emailchoice == "send" + if emailchoice == "send": print("What email address?") emailaddress = input() appopen = 1 From 899802c798e2471b25c22711ec71f484c0f8be63 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 18:15:48 -0400 Subject: [PATCH 026/206] Update PythonPuter.py --- Projects/PythonPuter.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Projects/PythonPuter.py b/Projects/PythonPuter.py index c361390..0e088cc 100644 --- a/Projects/PythonPuter.py +++ b/Projects/PythonPuter.py @@ -45,25 +45,35 @@ # Opening Apps while appopen == 0: + sleep(0.2) print("What application do you want to open?") app = input() # Chrome if app == "email": print("Opening Email") + sleep(0.2) + print("Send or Check") emailchoice = input() if emailchoice == "send": - print("What email address?") - emailaddress = input() + print("What Email Address?") + emailaddress = input("Email:") + print("What Subject?") + emailsubject = input("Subject:") + print("What Message") + emailmessage = input("Message:") + print ("Sending to:",emailaddress,"Subject:",emailsubject,"Message:",emailmessage) appopen = 1 # Application not found else: print("Application not found") + sleep(0.2) appopen = 0 # Application closed if appopen == 1: print("Application Closed") + sleep(0.2) appopen = 0 From 2787cd6a07ecb5dbe6e0e67f3fff3277c6c05bb4 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 18:17:17 -0400 Subject: [PATCH 027/206] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5d8a60e..b367b7f 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,5 @@ My discord info is on my github profile page. * Python (https://www.python.org) * Repl.it (https://repl.it/languages/python3) * Trinket (https://trinket.io) +## Contact +Dicord: https://discord.gg/AX8rCaa From 950d617bb1f12ec9385912ba74c1174e22937699 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 18:17:27 -0400 Subject: [PATCH 028/206] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b367b7f..1fc21b3 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,4 @@ My discord info is on my github profile page. * Repl.it (https://repl.it/languages/python3) * Trinket (https://trinket.io) ## Contact -Dicord: https://discord.gg/AX8rCaa +Discord: https://discord.gg/AX8rCaa From f312788df98bcabd23c9ec727f635de591503b86 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 18:45:02 -0400 Subject: [PATCH 029/206] Update PythonPuter.py --- Projects/PythonPuter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Projects/PythonPuter.py b/Projects/PythonPuter.py index 0e088cc..2f27743 100644 --- a/Projects/PythonPuter.py +++ b/Projects/PythonPuter.py @@ -63,6 +63,8 @@ print("What Message") emailmessage = input("Message:") print ("Sending to:",emailaddress,"Subject:",emailsubject,"Message:",emailmessage) + else: + print("Please Retry") appopen = 1 # Application not found From 902d9e93f44f953091baae0fd67682b35d415835 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 18:45:31 -0400 Subject: [PATCH 030/206] Update PythonPuter.py --- Projects/PythonPuter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/PythonPuter.py b/Projects/PythonPuter.py index 2f27743..eed3f1b 100644 --- a/Projects/PythonPuter.py +++ b/Projects/PythonPuter.py @@ -49,7 +49,7 @@ print("What application do you want to open?") app = input() - # Chrome + # Email if app == "email": print("Opening Email") sleep(0.2) From 6cc292bad84dbbdbdec4b8f770282ea91cd1ffe7 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 13 Oct 2017 20:45:16 -0400 Subject: [PATCH 031/206] Update PythonPuter.py --- Projects/PythonPuter.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Projects/PythonPuter.py b/Projects/PythonPuter.py index eed3f1b..461f549 100644 --- a/Projects/PythonPuter.py +++ b/Projects/PythonPuter.py @@ -31,7 +31,7 @@ # Wrong Login Check attempts = 1 -while Username != "ADMIN" or Password !="ADMIN": +while Username != "admin" or Password !="pass": if attempts >0: print("Wrong Username or Password") attempts += 1 @@ -39,7 +39,7 @@ Password = input("Password:") # Correct Login Check -if Username == "ADMIN" and Password == "ADMIN": +if Username == "admin" and Password == "pass": print("Successfully Logged In") sleep(0.2) @@ -63,10 +63,16 @@ print("What Message") emailmessage = input("Message:") print ("Sending to:",emailaddress,"Subject:",emailsubject,"Message:",emailmessage) - else: - print("Please Retry") appopen = 1 + # Password Gen + if app == "passgen": + print("How many passwords do you want?") + passgenamount = int(input("Passwords:")) + for x in range(passgenamount): + print (random.randint(10000000,100000000)) + appopen = 1 + # Application not found else: print("Application not found") From ca1af3387330f74373786450627e166a644c2e7c Mon Sep 17 00:00:00 2001 From: pythoncatcoder Date: Sat, 14 Oct 2017 10:05:53 -0400 Subject: [PATCH 032/206] Update PythonPuter.py --- Projects/PythonPuter.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Projects/PythonPuter.py b/Projects/PythonPuter.py index 461f549..5b6d4d8 100644 --- a/Projects/PythonPuter.py +++ b/Projects/PythonPuter.py @@ -1,7 +1,8 @@ from time import sleep import sys import random - +def destroy(): + sys.exit() # Variables login = 0 Username = 0 @@ -20,7 +21,7 @@ if startcomputer == "n": print("Shutting Down") - quit() + destroy() # Login if login == 1: @@ -72,7 +73,16 @@ for x in range(passgenamount): print (random.randint(10000000,100000000)) appopen = 1 - + #log out + if app == "logout": + print("logging out...") + print("please wait...") + print("Woud you like to Shut Down?") + shutdown = input("[y]/[n]:") + if shutdown == "y": + quit() + else: + print("Error #256: No file to cancel shutdown") # Application not found else: print("Application not found") @@ -84,4 +94,3 @@ print("Application Closed") sleep(0.2) appopen = 0 - From 8c49fd284d1176a3b5c2681424d35b697cb5e1c8 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 10:11:13 -0400 Subject: [PATCH 033/206] Update PythonPuter.py --- Projects/PythonPuter.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Projects/PythonPuter.py b/Projects/PythonPuter.py index 5b6d4d8..ff9b2bf 100644 --- a/Projects/PythonPuter.py +++ b/Projects/PythonPuter.py @@ -73,7 +73,7 @@ def destroy(): for x in range(passgenamount): print (random.randint(10000000,100000000)) appopen = 1 - #log out + # Log Out if app == "logout": print("logging out...") print("please wait...") @@ -81,8 +81,9 @@ def destroy(): shutdown = input("[y]/[n]:") if shutdown == "y": quit() - else: - print("Error #256: No file to cancel shutdown") + if shutdown == "n": + print("Canceling Shutdown") + appopen = 1 # Application not found else: print("Application not found") From ba36349b54e1a223d464258b67190ea65b1cae2a Mon Sep 17 00:00:00 2001 From: pythoncatcoder Date: Sat, 14 Oct 2017 12:10:07 -0400 Subject: [PATCH 034/206] Create cmd --- cmd | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 cmd diff --git a/cmd b/cmd new file mode 100644 index 0000000..8a0b570 --- /dev/null +++ b/cmd @@ -0,0 +1,45 @@ +import time +import random +import os + +print("Please Authenticate Yourself.") +time.sleep(3) +print("Please log in.") +time.sleep(2) +while True: + + USER = input("Username") + PASS = input("Password") + if USER == "admin": + if PASS == "admin": + while True: + print("Welcome to the command line emulator.") + print("Type in [help1] for more options") + while True: + command = input("admin@pyputer $ ") + if command == "help1": + print(""" + +Help page #1 + [help1] displays this page + + [man {app}] shows manual for app + + [help2] next page""") + + if command == "" + + + + + + + + + + + else: + print("-bash:", command, "is not a command.") + + else: + print("Authentication Failed. Please try again.") From e9d8d617b96c1ae4a1f01507dc2694225dfdfc73 Mon Sep 17 00:00:00 2001 From: pythoncatcoder Date: Sat, 14 Oct 2017 12:29:37 -0400 Subject: [PATCH 035/206] Update cmd --- cmd | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/cmd b/cmd index 8a0b570..877910b 100644 --- a/cmd +++ b/cmd @@ -1,6 +1,12 @@ import time import random import os +def passgen(): + print("How many passwords do you want?") + passgenamount = int(input("Passwords:")) + for x in range(passgenamount): + print (random.randint(10000000,100000000)) + print("Please Authenticate Yourself.") time.sleep(3) @@ -23,23 +29,26 @@ while True: Help page #1 [help1] displays this page + [passgen] generates secure 8 digit passwords + [man {app}] shows manual for app [help2] next page""") - if command == "" - - - - + if command == "pass-gen": + passgen() + if command == "man pass-gen": + print("""Manual page for Passgen + passgen is a free open-source application included in the pyputer operating system. It generates a random password that is 8 digit long and secure. To use it, type in pass-gen and the file will execute.""") + else: - print("-bash:", command, "is not a command.") + print("-bash:", command, "is not a command") else: print("Authentication Failed. Please try again.") From 14620583b2eafb3cd8e0ccdf4666a451cd3fb403 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 12:38:08 -0400 Subject: [PATCH 036/206] Rename cmd to Projects/cmd.py --- cmd => Projects/cmd.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename cmd => Projects/cmd.py (100%) diff --git a/cmd b/Projects/cmd.py similarity index 100% rename from cmd rename to Projects/cmd.py From d19e7b6e0590860f6ddf5ac09ab0d3df929d36e1 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 13:10:42 -0400 Subject: [PATCH 037/206] Create pycmd.py --- Projects/pycmd.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Projects/pycmd.py diff --git a/Projects/pycmd.py b/Projects/pycmd.py new file mode 100644 index 0000000..dbbb050 --- /dev/null +++ b/Projects/pycmd.py @@ -0,0 +1,28 @@ +# Imports +from time import sleep +import random +import datetime +# Variables +cmd = 1 + +# Command +while cmd == 1: + command = input("Command:") + + # Time + if command == "time": + time = datetime.datetime.now() + print(time.year) + cmd = 0 + # Pass Gen + if command == "passgen": + print("How many passwords do you want?") + passgenamount = int(input("Passwords:")) + for x in range(passgenamount): + print (random.randint(10000000,100000000)) + cmd = 0 + if cmd == 0: + print("Command Executed") + cmd = 1 + else: + print(command,"is not a command") From b9eeb858eac59f0bf4c89532dda0944a3dfcfed3 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 13:11:34 -0400 Subject: [PATCH 038/206] Update pycmd.py --- Projects/pycmd.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Projects/pycmd.py b/Projects/pycmd.py index dbbb050..4362528 100644 --- a/Projects/pycmd.py +++ b/Projects/pycmd.py @@ -21,8 +21,11 @@ for x in range(passgenamount): print (random.randint(10000000,100000000)) cmd = 0 + # Command Finished if cmd == 0: print("Command Executed") cmd = 1 + + # Command Not Found else: print(command,"is not a command") From c78acdf8ed8bc0b36e48326d8ef7510090980a03 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 13:11:56 -0400 Subject: [PATCH 039/206] Update pycmd.py --- Projects/pycmd.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Projects/pycmd.py b/Projects/pycmd.py index 4362528..0624667 100644 --- a/Projects/pycmd.py +++ b/Projects/pycmd.py @@ -14,6 +14,7 @@ time = datetime.datetime.now() print(time.year) cmd = 0 + # Pass Gen if command == "passgen": print("How many passwords do you want?") @@ -21,6 +22,7 @@ for x in range(passgenamount): print (random.randint(10000000,100000000)) cmd = 0 + # Command Finished if cmd == 0: print("Command Executed") From e1677ab221907569f9dcbc6fb3c152f75464ffb3 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 13:12:08 -0400 Subject: [PATCH 040/206] Update pycmd.py From 69059eee74622cceb3c131f3a802886046d1c439 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 13:39:01 -0400 Subject: [PATCH 041/206] Update pycmd.py --- Projects/pycmd.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Projects/pycmd.py b/Projects/pycmd.py index 0624667..b54806d 100644 --- a/Projects/pycmd.py +++ b/Projects/pycmd.py @@ -4,7 +4,8 @@ import datetime # Variables cmd = 1 - +username = 1 +password = 1 # Command while cmd == 1: command = input("Command:") @@ -23,6 +24,20 @@ print (random.randint(10000000,100000000)) cmd = 0 + # Login + if command == "login": + if username == "admin" and password =="admin": + print("Already Logged In") + cmd = 0 + if username != "admin" and password !="admin": + username = input("Username:") + password = input("Password:") + if username == "admin" and password == "admin": + print("Logged In Successfully") + cmd = 0 + if username != "admin" and password !="admin": + print("Wrong Username or Password") + cmd = 0 # Command Finished if cmd == 0: print("Command Executed") From a5fb366cbc24110b58db4a54ca12de37ef96e84e Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 13:40:33 -0400 Subject: [PATCH 042/206] Update pycmd.py --- Projects/pycmd.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Projects/pycmd.py b/Projects/pycmd.py index b54806d..78ad321 100644 --- a/Projects/pycmd.py +++ b/Projects/pycmd.py @@ -6,6 +6,7 @@ cmd = 1 username = 1 password = 1 +admin = 0 # Command while cmd == 1: command = input("Command:") @@ -34,13 +35,14 @@ password = input("Password:") if username == "admin" and password == "admin": print("Logged In Successfully") + admin = 1 cmd = 0 if username != "admin" and password !="admin": print("Wrong Username or Password") cmd = 0 # Command Finished if cmd == 0: - print("Command Executed") + print("Command Finished") cmd = 1 # Command Not Found From 241ec04d10779762c0dbccafff5c2939d190cde2 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 13:45:42 -0400 Subject: [PATCH 043/206] Update pycmd.py --- Projects/pycmd.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Projects/pycmd.py b/Projects/pycmd.py index 78ad321..69b9d19 100644 --- a/Projects/pycmd.py +++ b/Projects/pycmd.py @@ -14,9 +14,24 @@ # Time if command == "time": time = datetime.datetime.now() - print(time.year) - cmd = 0 - + print("Enter [y],[m],[d],[h],[min]") + timeformat = input("Time Format:") + if timeformat == "y": + print(time.year) + cmd = 0 + if timeformat == "m": + print(time.month) + cmd = 0 + if timeformat == "d": + print(time.day) + cmd = 0 + if timeformat == "h": + print(time.hour) + cmd = 0 + if timeformat == "min": + print(time.minute) + cmd = 0 + # Pass Gen if command == "passgen": print("How many passwords do you want?") From 639729d04d0410be314727c0f768c8b5397c4461 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 14:00:08 -0400 Subject: [PATCH 044/206] Update pycmd.py --- Projects/pycmd.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Projects/pycmd.py b/Projects/pycmd.py index 69b9d19..99a9e24 100644 --- a/Projects/pycmd.py +++ b/Projects/pycmd.py @@ -55,6 +55,22 @@ if username != "admin" and password !="admin": print("Wrong Username or Password") cmd = 0 + + # Email + if command == "email": + if admin == 1: + print("What email address?") + address = input("Address:") + print("What subject?") + subject = input("Subject:") + print("What message?") + message = input("Message:") + print("Sent to:",address,"Subject:",subject,"Message:",message) + cmd = 0 + else: + print("You need admin permission") + cmd = 0 + # Command Finished if cmd == 0: print("Command Finished") From 4dee14c66a9cff3178da46cb36fb6b7f8e58a4e7 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 14:03:05 -0400 Subject: [PATCH 045/206] Update pycmd.py --- Projects/pycmd.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Projects/pycmd.py b/Projects/pycmd.py index 99a9e24..e8643a6 100644 --- a/Projects/pycmd.py +++ b/Projects/pycmd.py @@ -2,13 +2,17 @@ from time import sleep import random import datetime + # Variables cmd = 1 username = 1 password = 1 admin = 0 + # Command while cmd == 1: + if admin == 0: + print("Please Login To Enable All Features") command = input("Command:") # Time From 41f95232131dfef900bf8efbfe2a05c296fc5e41 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 14:04:19 -0400 Subject: [PATCH 046/206] Update pycmd.py --- Projects/pycmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/pycmd.py b/Projects/pycmd.py index e8643a6..66f1e91 100644 --- a/Projects/pycmd.py +++ b/Projects/pycmd.py @@ -72,7 +72,7 @@ print("Sent to:",address,"Subject:",subject,"Message:",message) cmd = 0 else: - print("You need admin permission") + print("You need to login") cmd = 0 # Command Finished From a1eed9a68979ba42070003309c511e639c93caa8 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 14:25:19 -0400 Subject: [PATCH 047/206] Update pycmd.py --- Projects/pycmd.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Projects/pycmd.py b/Projects/pycmd.py index 66f1e91..ea982c8 100644 --- a/Projects/pycmd.py +++ b/Projects/pycmd.py @@ -36,7 +36,7 @@ print(time.minute) cmd = 0 - # Pass Gen + # Password Generat if command == "passgen": print("How many passwords do you want?") passgenamount = int(input("Passwords:")) @@ -75,6 +75,27 @@ print("You need to login") cmd = 0 + # GitHub + if command == "github": + if admin == 1: + print("What do you want to search for?") + githubsearch = input("Search:") + print("Go to: https://github.com/search?utf8=%E2%9C%93&q=",githubsearch,"&type=", sep='') + cmd = 0 + else: + print("You need to login") + cmd = 0 + + # Google + if command == "google": + if admin == 1: + print("What do you want to search for?") + googlesearch = input("Search:") + print("https://www.google.com/search?&q=",googlesearch, sep = '') + cmd = 0 + else: + print("You need to login") + cmd = 0 # Command Finished if cmd == 0: print("Command Finished") From 9f2e2231172278c3a4b6f96a5f2ddac1f486bf62 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 14:29:24 -0400 Subject: [PATCH 048/206] Update pycmd.py --- Projects/pycmd.py | 68 ++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/Projects/pycmd.py b/Projects/pycmd.py index ea982c8..c1f6bdf 100644 --- a/Projects/pycmd.py +++ b/Projects/pycmd.py @@ -15,35 +15,6 @@ print("Please Login To Enable All Features") command = input("Command:") - # Time - if command == "time": - time = datetime.datetime.now() - print("Enter [y],[m],[d],[h],[min]") - timeformat = input("Time Format:") - if timeformat == "y": - print(time.year) - cmd = 0 - if timeformat == "m": - print(time.month) - cmd = 0 - if timeformat == "d": - print(time.day) - cmd = 0 - if timeformat == "h": - print(time.hour) - cmd = 0 - if timeformat == "min": - print(time.minute) - cmd = 0 - - # Password Generat - if command == "passgen": - print("How many passwords do you want?") - passgenamount = int(input("Passwords:")) - for x in range(passgenamount): - print (random.randint(10000000,100000000)) - cmd = 0 - # Login if command == "login": if username == "admin" and password =="admin": @@ -59,7 +30,44 @@ if username != "admin" and password !="admin": print("Wrong Username or Password") cmd = 0 - + + # Time + if command == "time": + if admin == 1: + time = datetime.datetime.now() + print("Enter [y],[m],[d],[h],[min]") + timeformat = input("Time Format:") + if timeformat == "y": + print(time.year) + cmd = 0 + if timeformat == "m": + print(time.month) + cmd = 0 + if timeformat == "d": + print(time.day) + cmd = 0 + if timeformat == "h": + print(time.hour) + cmd = 0 + if timeformat == "min": + print(time.minute) + cmd = 0 + else: + print("You need to login") + cmd = 0 + + # Password Generater + if command == "passgen": + if admin == 1: + print("How many passwords do you want?") + passgenamount = int(input("Passwords:")) + for x in range(passgenamount): + print (random.randint(10000000,100000000)) + cmd = 0 + else: + print("You need to login") + cmd = 0 + # Email if command == "email": if admin == 1: From 2b1748d9ee5c372e32c8ab23aa2b74d5956fc7a2 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 14:33:05 -0400 Subject: [PATCH 049/206] Update pycmd.py --- Projects/pycmd.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Projects/pycmd.py b/Projects/pycmd.py index c1f6bdf..c1bbbfc 100644 --- a/Projects/pycmd.py +++ b/Projects/pycmd.py @@ -15,6 +15,15 @@ print("Please Login To Enable All Features") command = input("Command:") + # Help + if command == "help": + if admin == 1: + print("Commands: time, passgen, email, github, google") + cmd = 0 + else: + print("Login by typing login") + cmd = 0 + # Login if command == "login": if username == "admin" and password =="admin": From b8e386eec9b73815baec22aa23eec55393d2212b Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 15:51:13 -0400 Subject: [PATCH 050/206] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1fc21b3..c8ff09d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Python ## Helping -If you want to edit tutorials, message me (Mosrod) on discord. +If you want to edit tutorials, message me (Mosrod#9596) on discord. My discord info is on my github profile page. ## Compilers * Python (https://www.python.org) From dfd50137c641e34ea96d327f13272ab5dc0e29ff Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 14 Oct 2017 15:53:32 -0400 Subject: [PATCH 051/206] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index c8ff09d..049832e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Python ## Helping If you want to edit tutorials, message me (Mosrod#9596) on discord. -My discord info is on my github profile page. ## Compilers * Python (https://www.python.org) * Repl.it (https://repl.it/languages/python3) From 9e2ce75709e83c6d4869d62a103d59d43e5d281f Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 20 Oct 2017 17:27:04 -0400 Subject: [PATCH 052/206] Rename PythonPuterBeta to PythonPuterBeta.py --- Projects/{PythonPuterBeta => PythonPuterBeta.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Projects/{PythonPuterBeta => PythonPuterBeta.py} (100%) diff --git a/Projects/PythonPuterBeta b/Projects/PythonPuterBeta.py similarity index 100% rename from Projects/PythonPuterBeta rename to Projects/PythonPuterBeta.py From b48741f38902c3d5dfd52ce4359f42a9c5518baf Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 20 Oct 2017 17:52:14 -0400 Subject: [PATCH 053/206] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 049832e..c18dc90 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,9 @@ ## Helping If you want to edit tutorials, message me (Mosrod#9596) on discord. ## Compilers - * Python (https://www.python.org) - * Repl.it (https://repl.it/languages/python3) - * Trinket (https://trinket.io) + * [Python](https://www.python.org) + * [PyCharm](https://www.jetbrains.com/pycharm/) + * [Repl.it](https://repl.it/languages/python3) + * [Trinket](https://trinket.io) ## Contact Discord: https://discord.gg/AX8rCaa From a34577dd0ca10d67d91e5113f3c2bac96b626573 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 20 Oct 2017 17:53:21 -0400 Subject: [PATCH 054/206] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c18dc90..0c1fb0a 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,4 @@ If you want to edit tutorials, message me (Mosrod#9596) on discord. * [Repl.it](https://repl.it/languages/python3) * [Trinket](https://trinket.io) ## Contact -Discord: https://discord.gg/AX8rCaa +[Discord](https://discord.gg/AX8rCaa) From a1b57cc226efbca8ca1a6d46b32446afbd2f2ce5 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 20 Oct 2017 18:37:42 -0400 Subject: [PATCH 055/206] Update Variables.md --- Tutorials/Variables.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tutorials/Variables.md b/Tutorials/Variables.md index af61313..5881def 100644 --- a/Tutorials/Variables.md +++ b/Tutorials/Variables.md @@ -44,3 +44,7 @@ dollars = "none" dollars = 1 dollars += 1 ``` + + +## Gif + From 578f3d532e65081d1f2c5e94bb92ebd5ccfa8d52 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 20 Oct 2017 18:45:09 -0400 Subject: [PATCH 056/206] Update Variables.md --- Tutorials/Variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tutorials/Variables.md b/Tutorials/Variables.md index 5881def..3b620f6 100644 --- a/Tutorials/Variables.md +++ b/Tutorials/Variables.md @@ -47,4 +47,4 @@ dollars += 1 ## Gif - +![Variables](https://raw.githubusercontent.com/CodingTutorials/Files/master/Python/variables.gif "Variable") From f48b53b40523f0a350e1c18bc1e7458ffa11bfc7 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 20 Oct 2017 19:56:31 -0400 Subject: [PATCH 057/206] Update Print.md --- Tutorials/Print.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tutorials/Print.md b/Tutorials/Print.md index cd30b28..739965f 100644 --- a/Tutorials/Print.md +++ b/Tutorials/Print.md @@ -71,3 +71,7 @@ Run: ``` Var equals Surprise ``` + + +## Gif +![Print](https://raw.githubusercontent.com/CodingTutorials/Files/master/Python/print.gif "Print") From fbcda488515f5f3f269087e8bb5298ca6fc3f4d1 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 18:20:26 -0400 Subject: [PATCH 058/206] Rename Variables.md to 01Variables.md --- Tutorials/{Variables.md => 01Variables.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{Variables.md => 01Variables.md} (100%) diff --git a/Tutorials/Variables.md b/Tutorials/01Variables.md similarity index 100% rename from Tutorials/Variables.md rename to Tutorials/01Variables.md From 069e4c61202ef99a96453b9f26a5cd8297fdf605 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 18:20:58 -0400 Subject: [PATCH 059/206] Rename If.md to 02If.md --- Tutorials/{If.md => 02If.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{If.md => 02If.md} (100%) diff --git a/Tutorials/If.md b/Tutorials/02If.md similarity index 100% rename from Tutorials/If.md rename to Tutorials/02If.md From fcdae36977de2acd108ac111d828448a38b7ff3e Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 18:21:13 -0400 Subject: [PATCH 060/206] Rename Print.md to 02Print.md --- Tutorials/{Print.md => 02Print.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{Print.md => 02Print.md} (100%) diff --git a/Tutorials/Print.md b/Tutorials/02Print.md similarity index 100% rename from Tutorials/Print.md rename to Tutorials/02Print.md From 3c7b938ac9605dd9bb646f53bbef8cc5c084a4f6 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 18:21:24 -0400 Subject: [PATCH 061/206] Rename 02If.md to 03If.md --- Tutorials/{02If.md => 03If.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{02If.md => 03If.md} (100%) diff --git a/Tutorials/02If.md b/Tutorials/03If.md similarity index 100% rename from Tutorials/02If.md rename to Tutorials/03If.md From dbae715061264070bbed215cf93bc98bcb800b76 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 18:23:59 -0400 Subject: [PATCH 062/206] Update 01Variables.md --- Tutorials/01Variables.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Tutorials/01Variables.md b/Tutorials/01Variables.md index 3b620f6..af61313 100644 --- a/Tutorials/01Variables.md +++ b/Tutorials/01Variables.md @@ -44,7 +44,3 @@ dollars = "none" dollars = 1 dollars += 1 ``` - - -## Gif -![Variables](https://raw.githubusercontent.com/CodingTutorials/Files/master/Python/variables.gif "Variable") From 54a3947b3e070086f03d7ff5a545ca9fa0f7cbb6 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 18:24:09 -0400 Subject: [PATCH 063/206] Update 02Print.md --- Tutorials/02Print.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Tutorials/02Print.md b/Tutorials/02Print.md index 739965f..cd30b28 100644 --- a/Tutorials/02Print.md +++ b/Tutorials/02Print.md @@ -71,7 +71,3 @@ Run: ``` Var equals Surprise ``` - - -## Gif -![Print](https://raw.githubusercontent.com/CodingTutorials/Files/master/Python/print.gif "Print") From 39724b2d2cb2841c5d608e22f85cd2894b3a28e6 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 18:37:45 -0400 Subject: [PATCH 064/206] Create 04AdvancedPrintFunctions.md --- Tutorials/04AdvancedPrintFunctions.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Tutorials/04AdvancedPrintFunctions.md diff --git a/Tutorials/04AdvancedPrintFunctions.md b/Tutorials/04AdvancedPrintFunctions.md new file mode 100644 index 0000000..c725585 --- /dev/null +++ b/Tutorials/04AdvancedPrintFunctions.md @@ -0,0 +1,18 @@ +# AdvancedPrintFunctions +## Requirements +> Tips & Tricks: Use a + sign to combine strings and variables together (without spaces) + +Input: +```python +Bob +``` + +Output: +```python +Hello, Bob! +``` +## Solution + + +print('Hello, ' + input() + '!') +print('Hello, ' + input() + '!') From 4003f1ac1105186b348ef54210fc20fce8e7743b Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 18:38:08 -0400 Subject: [PATCH 065/206] Update 04AdvancedPrintFunctions.md --- Tutorials/04AdvancedPrintFunctions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tutorials/04AdvancedPrintFunctions.md b/Tutorials/04AdvancedPrintFunctions.md index c725585..abe643b 100644 --- a/Tutorials/04AdvancedPrintFunctions.md +++ b/Tutorials/04AdvancedPrintFunctions.md @@ -1,4 +1,4 @@ -# AdvancedPrintFunctions +# Advanced Print Functions ## Requirements > Tips & Tricks: Use a + sign to combine strings and variables together (without spaces) From 7d6f3da11216ccc1b5bcd2abb2cc041c67cacf93 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 18:45:59 -0400 Subject: [PATCH 066/206] Update 04AdvancedPrintFunctions.md --- Tutorials/04AdvancedPrintFunctions.md | 36 ++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/Tutorials/04AdvancedPrintFunctions.md b/Tutorials/04AdvancedPrintFunctions.md index abe643b..b48dada 100644 --- a/Tutorials/04AdvancedPrintFunctions.md +++ b/Tutorials/04AdvancedPrintFunctions.md @@ -12,7 +12,35 @@ Output: Hello, Bob! ``` ## Solution - - -print('Hello, ' + input() + '!') -print('Hello, ' + input() + '!') +Type the print function +```python +print() +``` +Add a pair of quotation marks +```python +print("") +``` +Type "Hello, " in the quotation marks +```python +print("Hello, ") +``` +Add a plus sign to combine the strings +```python +print("Hello, " + ) +``` +Add a input function +```python +print("Hello, " + input()) +``` +Add another + sign +```python +print("Hello, " + input() + ) +``` +Add a pair of quotation marks +```python +print("Hello, " + input() + "") +``` +Add an exclamation mark inside the pair of quotation mark +```python +print("Hello, " + input() + "!") +``` From 3af62c2ea37b572ca6e9983aac70e6c1c31ec32d Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 18:57:51 -0400 Subject: [PATCH 067/206] Create 04Input --- Tutorials/04Input | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Tutorials/04Input diff --git a/Tutorials/04Input b/Tutorials/04Input new file mode 100644 index 0000000..54e5cac --- /dev/null +++ b/Tutorials/04Input @@ -0,0 +1,77 @@ +# Input + +Write "input". + +```python +input +``` + +Add a pair of parenthesis + +```python +input() +``` + +If you want there to be text before the input, put a variable or a pair of quotation marks and text + +```python +input("Yes/No:") +``` + + +## Examples + +### Example 1: +```python +input("Do you want an apple? [Y|N]") +``` +Run: +``` +Do you want an apple? [Y|N]:[](https://vignette.wikia.nocookie.net/uncyclopedia/images/b/b8/Thin_cursor.gif/revision/latest?cb=20091129041432) +``` + +### Example 2: +```python +apples = "alot" +if apples == "alot": + print("You have",apples,"apples") +``` +Run: +``` +You have alot apples +``` + + +### Example 3: +```python +apples = 1 +if apples == 1: + print("You have",apples,"apples") +apples = 2 +if apples == 2: + print("You have",apples,"apples") +``` +Run: +``` +You have 1 apples +You have 2 apples +``` + +## Example 4: +```python +apples = 1 +if apples == 1: + print("You have",apples,"apples") + apples = 2 +if apples == 2: + print("You have",apples,"apples") + apples += 1 +if apples == 3: + print("You have",apples,"apples") +``` +Run: +``` +You have 1 apples +You have 2 apples +You have 3 apples +``` From e8e436e157ec727616a7e5ed99eea58c143c06c8 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 18:58:03 -0400 Subject: [PATCH 068/206] Rename 04Input to 04Input.md --- Tutorials/{04Input => 04Input.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{04Input => 04Input.md} (100%) diff --git a/Tutorials/04Input b/Tutorials/04Input.md similarity index 100% rename from Tutorials/04Input rename to Tutorials/04Input.md From c3fa2a10e0fdc1b346eb9b35f8281b36825ed03a Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 19:02:39 -0400 Subject: [PATCH 069/206] Update 04Input.md --- Tutorials/04Input.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Tutorials/04Input.md b/Tutorials/04Input.md index 54e5cac..bc4cbd4 100644 --- a/Tutorials/04Input.md +++ b/Tutorials/04Input.md @@ -20,25 +20,23 @@ input("Yes/No:") ## Examples - +> Note: These examples are snippets of code and **do not** include variables ### Example 1: ```python input("Do you want an apple? [Y|N]") ``` Run: ``` -Do you want an apple? [Y|N]:[](https://vignette.wikia.nocookie.net/uncyclopedia/images/b/b8/Thin_cursor.gif/revision/latest?cb=20091129041432) +Do you want an apple? [Y|N]: ``` ### Example 2: ```python -apples = "alot" -if apples == "alot": - print("You have",apples,"apples") +input("Is " + name + " your name?") ``` Run: ``` -You have alot apples +Is Bob your name? ``` From 0342ac0b167ce135fc39f8c6d3361e68a46dd89d Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 19:06:00 -0400 Subject: [PATCH 070/206] Update 04Input.md --- Tutorials/04Input.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tutorials/04Input.md b/Tutorials/04Input.md index bc4cbd4..5d569af 100644 --- a/Tutorials/04Input.md +++ b/Tutorials/04Input.md @@ -20,7 +20,7 @@ input("Yes/No:") ## Examples -> Note: These examples are snippets of code and **do not** include variables + ### Example 1: ```python input("Do you want an apple? [Y|N]") @@ -32,6 +32,7 @@ Do you want an apple? [Y|N]: ### Example 2: ```python +name = Bob input("Is " + name + " your name?") ``` Run: From aceaf6142d5fb16b3e2a15325bb2193e7f8d0c31 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 19:14:50 -0400 Subject: [PATCH 071/206] Update 04Input.md --- Tutorials/04Input.md | 39 ++++++++++++--------------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/Tutorials/04Input.md b/Tutorials/04Input.md index 5d569af..54c6c29 100644 --- a/Tutorials/04Input.md +++ b/Tutorials/04Input.md @@ -32,7 +32,7 @@ Do you want an apple? [Y|N]: ### Example 2: ```python -name = Bob +name = "Bob" input("Is " + name + " your name?") ``` Run: @@ -43,34 +43,19 @@ Is Bob your name? ### Example 3: ```python -apples = 1 -if apples == 1: - print("You have",apples,"apples") -apples = 2 -if apples == 2: - print("You have",apples,"apples") +name = input("What is your name?") +print("Hello, " + name + "!") +if name == Bob: + print("Have a great day, Bob!") ``` Run: -``` -You have 1 apples -You have 2 apples -``` - -## Example 4: ```python -apples = 1 -if apples == 1: - print("You have",apples,"apples") - apples = 2 -if apples == 2: - print("You have",apples,"apples") - apples += 1 -if apples == 3: - print("You have",apples,"apples") +What is your name? [Bob] +Hello, Bob! +Have a great day, Bob! ``` -Run: -``` -You have 1 apples -You have 2 apples -You have 3 apples +Run 2: +```python +What is your name? [Joe] +Hello, Joe ``` From 4b818f52fa44ab91419edc2e877a7395faffba84 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 19:15:15 -0400 Subject: [PATCH 072/206] Update 04Input.md --- Tutorials/04Input.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tutorials/04Input.md b/Tutorials/04Input.md index 54c6c29..877b35a 100644 --- a/Tutorials/04Input.md +++ b/Tutorials/04Input.md @@ -49,13 +49,13 @@ if name == Bob: print("Have a great day, Bob!") ``` Run: -```python +``` What is your name? [Bob] Hello, Bob! Have a great day, Bob! ``` Run 2: -```python +``` What is your name? [Joe] Hello, Joe ``` From 1dfdf9f4231a28fbecb4b411d61683f52f8cfc0d Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 19:22:32 -0400 Subject: [PATCH 073/206] Create 03Elif.md --- Tutorials/03Elif.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Tutorials/03Elif.md diff --git a/Tutorials/03Elif.md b/Tutorials/03Elif.md new file mode 100644 index 0000000..1518519 --- /dev/null +++ b/Tutorials/03Elif.md @@ -0,0 +1,17 @@ +# Elif + +> When you use a elif program, it tells the computer to do B instead of A if A is false + +Write a if statement + +```python +if a == "b": +``` + +Add "el" before the "if" + +```python +elif a == "b": +``` + +It has the same format as the if function, so look at that tutorial for a more in depth explanation. From 033a5fdb9e762517e195ae68c0626fc7917048ed Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 19:23:07 -0400 Subject: [PATCH 074/206] Rename 03Elif.md to 03-1Elif.md --- Tutorials/{03Elif.md => 03-1Elif.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{03Elif.md => 03-1Elif.md} (100%) diff --git a/Tutorials/03Elif.md b/Tutorials/03-1Elif.md similarity index 100% rename from Tutorials/03Elif.md rename to Tutorials/03-1Elif.md From ed0741399c675baeeebe8880c7d38d65ff02f92f Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 19:23:20 -0400 Subject: [PATCH 075/206] Rename 03If.md to 03-0If.md --- Tutorials/{03If.md => 03-0If.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{03If.md => 03-0If.md} (100%) diff --git a/Tutorials/03If.md b/Tutorials/03-0If.md similarity index 100% rename from Tutorials/03If.md rename to Tutorials/03-0If.md From 8e0167ceb85e27167991f0735376659ace806ec3 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 19:24:01 -0400 Subject: [PATCH 076/206] Rename 03-0If.md to 03If.md --- Tutorials/{03-0If.md => 03If.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{03-0If.md => 03If.md} (100%) diff --git a/Tutorials/03-0If.md b/Tutorials/03If.md similarity index 100% rename from Tutorials/03-0If.md rename to Tutorials/03If.md From e04c258398e48bd501ee2a5391e6b6aee7a83b14 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 19:24:11 -0400 Subject: [PATCH 077/206] Rename 03-1Elif.md to 03Elif.md --- Tutorials/{03-1Elif.md => 03Elif.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{03-1Elif.md => 03Elif.md} (100%) diff --git a/Tutorials/03-1Elif.md b/Tutorials/03Elif.md similarity index 100% rename from Tutorials/03-1Elif.md rename to Tutorials/03Elif.md From 42f5ff0e884fce7f42ca016f9b497b327cda9db7 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 19:24:33 -0400 Subject: [PATCH 078/206] Rename 03Elif.md to 03.1Elif.md --- Tutorials/{03Elif.md => 03.1Elif.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{03Elif.md => 03.1Elif.md} (100%) diff --git a/Tutorials/03Elif.md b/Tutorials/03.1Elif.md similarity index 100% rename from Tutorials/03Elif.md rename to Tutorials/03.1Elif.md From 405c8e57fba84ccbf5658fa9ff39c88b2909b0ad Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 19:24:50 -0400 Subject: [PATCH 079/206] Rename 03If.md to 03.1If.md --- Tutorials/{03If.md => 03.1If.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{03If.md => 03.1If.md} (100%) diff --git a/Tutorials/03If.md b/Tutorials/03.1If.md similarity index 100% rename from Tutorials/03If.md rename to Tutorials/03.1If.md From 34560178772674b9d0941b063da0b28a995c9f80 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 19:25:05 -0400 Subject: [PATCH 080/206] Rename 03.1Elif.md to 03.2Elif.md --- Tutorials/{03.1Elif.md => 03.2Elif.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{03.1Elif.md => 03.2Elif.md} (100%) diff --git a/Tutorials/03.1Elif.md b/Tutorials/03.2Elif.md similarity index 100% rename from Tutorials/03.1Elif.md rename to Tutorials/03.2Elif.md From 90746339a271475634aeba3a48690e35c0f60979 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 22 Oct 2017 19:31:25 -0400 Subject: [PATCH 081/206] Create 03.3Else.md --- Tutorials/03.3Else.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Tutorials/03.3Else.md diff --git a/Tutorials/03.3Else.md b/Tutorials/03.3Else.md new file mode 100644 index 0000000..ec2770c --- /dev/null +++ b/Tutorials/03.3Else.md @@ -0,0 +1,36 @@ +# Else +> This function checks if no if statements are true +Write "elif" + +```python +elif +``` + +Add a colon after "elif" + +```python +elif: +``` + +Put any code in a new line + +```python +elif: + print("Hello") +``` + + +## Examples + +### Example 1: +```python +money = 1 +if money == 1: + print("You have",money,"money") +else: + print("You dont have $1") +``` +Run: +``` +You have 1 money +``` From d98290fa19b64a7209440a186f5f2aaee1a9348a Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:27:21 -0400 Subject: [PATCH 082/206] Rename 04AdvancedPrintFunctions.md to 02AdvancedPrintFunctions.md --- .../{04AdvancedPrintFunctions.md => 02AdvancedPrintFunctions.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{04AdvancedPrintFunctions.md => 02AdvancedPrintFunctions.md} (100%) diff --git a/Tutorials/04AdvancedPrintFunctions.md b/Tutorials/02AdvancedPrintFunctions.md similarity index 100% rename from Tutorials/04AdvancedPrintFunctions.md rename to Tutorials/02AdvancedPrintFunctions.md From c0f951b21b1d47bfd6d198ec09f41b292fc2c666 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:27:55 -0400 Subject: [PATCH 083/206] Rename 02AdvancedPrintFunctions.md to 02.2AdvancedPrintFunctions.md --- ...{02AdvancedPrintFunctions.md => 02.2AdvancedPrintFunctions.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{02AdvancedPrintFunctions.md => 02.2AdvancedPrintFunctions.md} (100%) diff --git a/Tutorials/02AdvancedPrintFunctions.md b/Tutorials/02.2AdvancedPrintFunctions.md similarity index 100% rename from Tutorials/02AdvancedPrintFunctions.md rename to Tutorials/02.2AdvancedPrintFunctions.md From 93a8ce565311c5e74f7e488cfa0415d8475549bb Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:28:07 -0400 Subject: [PATCH 084/206] Rename 02Print.md to 02.1Print.md --- Tutorials/{02Print.md => 02.1Print.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{02Print.md => 02.1Print.md} (100%) diff --git a/Tutorials/02Print.md b/Tutorials/02.1Print.md similarity index 100% rename from Tutorials/02Print.md rename to Tutorials/02.1Print.md From 1bc0271fdedd3497f8872378420348c43357e5d9 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:28:37 -0400 Subject: [PATCH 085/206] Create Python --- Tutorials/1/Python | 1 + 1 file changed, 1 insertion(+) create mode 100644 Tutorials/1/Python diff --git a/Tutorials/1/Python b/Tutorials/1/Python new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Tutorials/1/Python @@ -0,0 +1 @@ + From 458fc168e71f93ab81a1e3315f1f1a2c2ac3af15 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:28:55 -0400 Subject: [PATCH 086/206] Rename Tutorials/01Variables.md to Tutorials/1/Variables.md --- Tutorials/{01Variables.md => 1/Variables.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{01Variables.md => 1/Variables.md} (100%) diff --git a/Tutorials/01Variables.md b/Tutorials/1/Variables.md similarity index 100% rename from Tutorials/01Variables.md rename to Tutorials/1/Variables.md From 22e0f328acc8f0eaed1ecef37e4e0a77a23e388b Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:29:06 -0400 Subject: [PATCH 087/206] Rename Variables.md to 01Variables.md --- Tutorials/1/{Variables.md => 01Variables.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/1/{Variables.md => 01Variables.md} (100%) diff --git a/Tutorials/1/Variables.md b/Tutorials/1/01Variables.md similarity index 100% rename from Tutorials/1/Variables.md rename to Tutorials/1/01Variables.md From 3d3cf46c8b3bec7893b0102da0f50d707847f7be Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:29:16 -0400 Subject: [PATCH 088/206] Create 2 --- Tutorials/2 | 1 + 1 file changed, 1 insertion(+) create mode 100644 Tutorials/2 diff --git a/Tutorials/2 b/Tutorials/2 new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Tutorials/2 @@ -0,0 +1 @@ + From 7abb08dd937c3bb22a9ac00f7813cfac9e15a74f Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:30:23 -0400 Subject: [PATCH 089/206] Delete Python --- Tutorials/1/Python | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Tutorials/1/Python diff --git a/Tutorials/1/Python b/Tutorials/1/Python deleted file mode 100644 index 8b13789..0000000 --- a/Tutorials/1/Python +++ /dev/null @@ -1 +0,0 @@ - From ace6b823d20f20b90a0646d462e4a4999e51ac14 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:30:43 -0400 Subject: [PATCH 090/206] Rename 01Variables.md to 1Variables.md --- Tutorials/1/{01Variables.md => 1Variables.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/1/{01Variables.md => 1Variables.md} (100%) diff --git a/Tutorials/1/01Variables.md b/Tutorials/1/1Variables.md similarity index 100% rename from Tutorials/1/01Variables.md rename to Tutorials/1/1Variables.md From 601edea7e7c15e4346c8a63bd604a3fb15c37fc5 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:31:18 -0400 Subject: [PATCH 091/206] Rename 1Variables.md to 1-1Variables.md --- Tutorials/1/{1Variables.md => 1-1Variables.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/1/{1Variables.md => 1-1Variables.md} (100%) diff --git a/Tutorials/1/1Variables.md b/Tutorials/1/1-1Variables.md similarity index 100% rename from Tutorials/1/1Variables.md rename to Tutorials/1/1-1Variables.md From e65ca7d78772b0b694046dd658c6712c0229dcdf Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:31:33 -0400 Subject: [PATCH 092/206] Rename Tutorials/1/1-1Variables.md to Tutorials/1-1Variables.md --- Tutorials/{1 => }/1-1Variables.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{1 => }/1-1Variables.md (100%) diff --git a/Tutorials/1/1-1Variables.md b/Tutorials/1-1Variables.md similarity index 100% rename from Tutorials/1/1-1Variables.md rename to Tutorials/1-1Variables.md From ff150061f5d8a0ba736778aea69a31963dd2d74a Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:32:05 -0400 Subject: [PATCH 093/206] Rename 02.1Print.md to 2-1Print.md --- Tutorials/{02.1Print.md => 2-1Print.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{02.1Print.md => 2-1Print.md} (100%) diff --git a/Tutorials/02.1Print.md b/Tutorials/2-1Print.md similarity index 100% rename from Tutorials/02.1Print.md rename to Tutorials/2-1Print.md From 2e7c0e4b9e87c8d008092ffd49369530f01f81ca Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:33:24 -0400 Subject: [PATCH 094/206] Rename 02.2AdvancedPrintFunctions.md to 2-2AdvancedPrintFunctions.md --- ...02.2AdvancedPrintFunctions.md => 2-2AdvancedPrintFunctions.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{02.2AdvancedPrintFunctions.md => 2-2AdvancedPrintFunctions.md} (100%) diff --git a/Tutorials/02.2AdvancedPrintFunctions.md b/Tutorials/2-2AdvancedPrintFunctions.md similarity index 100% rename from Tutorials/02.2AdvancedPrintFunctions.md rename to Tutorials/2-2AdvancedPrintFunctions.md From a8567f917c6b09215a546a74e05acd5e75d1734c Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:33:46 -0400 Subject: [PATCH 095/206] Delete 2 --- Tutorials/2 | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Tutorials/2 diff --git a/Tutorials/2 b/Tutorials/2 deleted file mode 100644 index 8b13789..0000000 --- a/Tutorials/2 +++ /dev/null @@ -1 +0,0 @@ - From 5eb4d43e4525e9caeffef7e11d49fb52bd1b8642 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:34:01 -0400 Subject: [PATCH 096/206] Rename 03.1If.md to 3-1If.md --- Tutorials/{03.1If.md => 3-1If.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{03.1If.md => 3-1If.md} (100%) diff --git a/Tutorials/03.1If.md b/Tutorials/3-1If.md similarity index 100% rename from Tutorials/03.1If.md rename to Tutorials/3-1If.md From 73eeec7a2b83f20052ff7012561373f32e120baf Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:34:13 -0400 Subject: [PATCH 097/206] Rename 03.2Elif.md to 3-2Elif.md --- Tutorials/{03.2Elif.md => 3-2Elif.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{03.2Elif.md => 3-2Elif.md} (100%) diff --git a/Tutorials/03.2Elif.md b/Tutorials/3-2Elif.md similarity index 100% rename from Tutorials/03.2Elif.md rename to Tutorials/3-2Elif.md From 356b124ad1663b104277d544dcc2fe76128c0ff8 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:34:31 -0400 Subject: [PATCH 098/206] Rename 03.3Else.md to 3-3Else.md --- Tutorials/{03.3Else.md => 3-3Else.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{03.3Else.md => 3-3Else.md} (100%) diff --git a/Tutorials/03.3Else.md b/Tutorials/3-3Else.md similarity index 100% rename from Tutorials/03.3Else.md rename to Tutorials/3-3Else.md From d7f540fd09826418e87cb63fd0fb9fcb65270a6a Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:34:49 -0400 Subject: [PATCH 099/206] Rename 04Input.md to 4-1Input.md --- Tutorials/{04Input.md => 4-1Input.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{04Input.md => 4-1Input.md} (100%) diff --git a/Tutorials/04Input.md b/Tutorials/4-1Input.md similarity index 100% rename from Tutorials/04Input.md rename to Tutorials/4-1Input.md From 5ab968202167072e26a447d7ce27961d35383980 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:36:55 -0400 Subject: [PATCH 100/206] Rename 2-2AdvancedPrintFunctions.md to 4-2AdvancedPrintFunctions.md --- ...{2-2AdvancedPrintFunctions.md => 4-2AdvancedPrintFunctions.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Tutorials/{2-2AdvancedPrintFunctions.md => 4-2AdvancedPrintFunctions.md} (100%) diff --git a/Tutorials/2-2AdvancedPrintFunctions.md b/Tutorials/4-2AdvancedPrintFunctions.md similarity index 100% rename from Tutorials/2-2AdvancedPrintFunctions.md rename to Tutorials/4-2AdvancedPrintFunctions.md From 0fc2345e68cd32a14b5e9bd084880b9b71a360c0 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 23 Oct 2017 18:40:56 -0400 Subject: [PATCH 101/206] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c1fb0a..591a926 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Python ## Helping -If you want to edit tutorials, message me (Mosrod#9596) on discord. +If you want to edit tutorials, go on the Discord server and ask. ## Compilers * [Python](https://www.python.org) * [PyCharm](https://www.jetbrains.com/pycharm/) From 4c3800b836c875dfaa735ee84c051ff802fd721d Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 27 Oct 2017 21:12:07 -0400 Subject: [PATCH 102/206] Update 4-2AdvancedPrintFunctions.md --- Tutorials/4-2AdvancedPrintFunctions.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tutorials/4-2AdvancedPrintFunctions.md b/Tutorials/4-2AdvancedPrintFunctions.md index b48dada..7b747e3 100644 --- a/Tutorials/4-2AdvancedPrintFunctions.md +++ b/Tutorials/4-2AdvancedPrintFunctions.md @@ -12,6 +12,9 @@ Output: Hello, Bob! ``` ## Solution + +>! Test + Type the print function ```python print() From 3badbc66fbc450ec9549b2f679cddd580d1c5431 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 27 Oct 2017 21:12:20 -0400 Subject: [PATCH 103/206] Update 4-2AdvancedPrintFunctions.md --- Tutorials/4-2AdvancedPrintFunctions.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/Tutorials/4-2AdvancedPrintFunctions.md b/Tutorials/4-2AdvancedPrintFunctions.md index 7b747e3..93a4682 100644 --- a/Tutorials/4-2AdvancedPrintFunctions.md +++ b/Tutorials/4-2AdvancedPrintFunctions.md @@ -13,8 +13,6 @@ Hello, Bob! ``` ## Solution ->! Test - Type the print function ```python print() From bfcdc3febd717ef54692d3eef4b679448ddad57e Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 27 Oct 2017 21:14:02 -0400 Subject: [PATCH 104/206] Update 4-2AdvancedPrintFunctions.md --- Tutorials/4-2AdvancedPrintFunctions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tutorials/4-2AdvancedPrintFunctions.md b/Tutorials/4-2AdvancedPrintFunctions.md index 93a4682..25c15c5 100644 --- a/Tutorials/4-2AdvancedPrintFunctions.md +++ b/Tutorials/4-2AdvancedPrintFunctions.md @@ -1,7 +1,7 @@ # Advanced Print Functions ## Requirements > Tips & Tricks: Use a + sign to combine strings and variables together (without spaces) - +>! Spoiler text Input: ```python Bob From 1d9fc980a4c277caeb1e7311f09b12ac2c1f0324 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 27 Oct 2017 21:14:16 -0400 Subject: [PATCH 105/206] Update 4-2AdvancedPrintFunctions.md --- Tutorials/4-2AdvancedPrintFunctions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Tutorials/4-2AdvancedPrintFunctions.md b/Tutorials/4-2AdvancedPrintFunctions.md index 25c15c5..75e79f4 100644 --- a/Tutorials/4-2AdvancedPrintFunctions.md +++ b/Tutorials/4-2AdvancedPrintFunctions.md @@ -2,6 +2,7 @@ ## Requirements > Tips & Tricks: Use a + sign to combine strings and variables together (without spaces) >! Spoiler text +>! Spoiler text Input: ```python Bob From 5ec039f78619026221a065b89ba4c07da778bafe Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 27 Oct 2017 21:14:30 -0400 Subject: [PATCH 106/206] Update 4-2AdvancedPrintFunctions.md --- Tutorials/4-2AdvancedPrintFunctions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tutorials/4-2AdvancedPrintFunctions.md b/Tutorials/4-2AdvancedPrintFunctions.md index 75e79f4..1f42a74 100644 --- a/Tutorials/4-2AdvancedPrintFunctions.md +++ b/Tutorials/4-2AdvancedPrintFunctions.md @@ -2,7 +2,7 @@ ## Requirements > Tips & Tricks: Use a + sign to combine strings and variables together (without spaces) >! Spoiler text ->! Spoiler text +! Spoiler text Input: ```python Bob From 2a5b85f22253186c2ed48728a43f5a07c9b07b75 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 27 Oct 2017 21:14:50 -0400 Subject: [PATCH 107/206] Update 4-2AdvancedPrintFunctions.md --- Tutorials/4-2AdvancedPrintFunctions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tutorials/4-2AdvancedPrintFunctions.md b/Tutorials/4-2AdvancedPrintFunctions.md index 1f42a74..312ac0b 100644 --- a/Tutorials/4-2AdvancedPrintFunctions.md +++ b/Tutorials/4-2AdvancedPrintFunctions.md @@ -1,8 +1,8 @@ # Advanced Print Functions + ## Requirements + > Tips & Tricks: Use a + sign to combine strings and variables together (without spaces) ->! Spoiler text -! Spoiler text Input: ```python Bob From 360015ebe2bf4558bcf041b7a5223b280cc89144 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 27 Oct 2017 21:15:45 -0400 Subject: [PATCH 108/206] Update 4-2AdvancedPrintFunctions.md --- Tutorials/4-2AdvancedPrintFunctions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Tutorials/4-2AdvancedPrintFunctions.md b/Tutorials/4-2AdvancedPrintFunctions.md index 312ac0b..0172461 100644 --- a/Tutorials/4-2AdvancedPrintFunctions.md +++ b/Tutorials/4-2AdvancedPrintFunctions.md @@ -7,6 +7,7 @@ Input: ```python Bob ``` +>! [Moderate] This is a moderate spoiler Output: ```python From 27309f117a7718fd30a07d494ff02cfe9d225a65 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 27 Oct 2017 21:15:54 -0400 Subject: [PATCH 109/206] Update 4-2AdvancedPrintFunctions.md --- Tutorials/4-2AdvancedPrintFunctions.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Tutorials/4-2AdvancedPrintFunctions.md b/Tutorials/4-2AdvancedPrintFunctions.md index 0172461..312ac0b 100644 --- a/Tutorials/4-2AdvancedPrintFunctions.md +++ b/Tutorials/4-2AdvancedPrintFunctions.md @@ -7,7 +7,6 @@ Input: ```python Bob ``` ->! [Moderate] This is a moderate spoiler Output: ```python From e125b2c28ee09554d1f15fcbce0ea5d946e5993d Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 7 Nov 2017 15:18:07 -0500 Subject: [PATCH 110/206] Create gradeconverter.py --- Projects/gradeconverter.py | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Projects/gradeconverter.py diff --git a/Projects/gradeconverter.py b/Projects/gradeconverter.py new file mode 100644 index 0000000..cddb3da --- /dev/null +++ b/Projects/gradeconverter.py @@ -0,0 +1,45 @@ +# Grade Converter +# http://cs.smith.edu/~jorourke/Grading.html + +Numerator = int(input("Points")) +Denominator = int(input("Total")) +Score = Numerator/Denominator * 100 + +if Score >= 97.5: + print("A+") + +elif Score >= 92.5: + print("A") + +elif Score >= 90.0: + print("A-") + +elif Score >= 87.5: + print("B+") + +elif Score >= 82.5: + print("B") + +elif Score >= 80.0: + print("B-") + +elif Score >= 77.5: + print("C+") + +elif Score >= 72.5: + print("C") + +elif Score >= 70.0: + print("C-") + +elif Score >= 67.5: + print("D+") + +elif Score >= 62.5: + print("D") + +elif Score >= 60.0: + print("D-") + +elif Score < 60.0: + print("F") From 7c86c3331815b882b4fda2de36f3252de8503e64 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 7 Nov 2017 15:42:10 -0500 Subject: [PATCH 111/206] Update gradeconverter.py --- Projects/gradeconverter.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Projects/gradeconverter.py b/Projects/gradeconverter.py index cddb3da..16c56b5 100644 --- a/Projects/gradeconverter.py +++ b/Projects/gradeconverter.py @@ -1,9 +1,15 @@ # Grade Converter # http://cs.smith.edu/~jorourke/Grading.html +Choice = input("Fraction/Percent [F/P]:") + +if Choice == "F": + Numerator = float(input("Points: ")) + Denominator = float(input("Total: ")) + Score = Numerator/Denominator * 100 + +if Choice == "P": + Score = float(input("Percent: ")) -Numerator = int(input("Points")) -Denominator = int(input("Total")) -Score = Numerator/Denominator * 100 if Score >= 97.5: print("A+") From f42c26fb3e0db27aa8dc0f80cd057a208eba334d Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 7 Nov 2017 15:43:49 -0500 Subject: [PATCH 112/206] Update gradeconverter.py --- Projects/gradeconverter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projects/gradeconverter.py b/Projects/gradeconverter.py index 16c56b5..967f307 100644 --- a/Projects/gradeconverter.py +++ b/Projects/gradeconverter.py @@ -2,12 +2,12 @@ # http://cs.smith.edu/~jorourke/Grading.html Choice = input("Fraction/Percent [F/P]:") -if Choice == "F": +if Choice == "F" or Choice == "f": Numerator = float(input("Points: ")) Denominator = float(input("Total: ")) Score = Numerator/Denominator * 100 -if Choice == "P": +if Choice == "P" or Choice == "p": Score = float(input("Percent: ")) From bd1c963494637c40ff645a365feab1b776731f62 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 12:56:58 -0500 Subject: [PATCH 113/206] Update gradeconverter.py --- Projects/gradeconverter.py | 96 ++++++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 41 deletions(-) diff --git a/Projects/gradeconverter.py b/Projects/gradeconverter.py index 967f307..f600197 100644 --- a/Projects/gradeconverter.py +++ b/Projects/gradeconverter.py @@ -1,51 +1,65 @@ # Grade Converter # http://cs.smith.edu/~jorourke/Grading.html -Choice = input("Fraction/Percent [F/P]:") -if Choice == "F" or Choice == "f": - Numerator = float(input("Points: ")) - Denominator = float(input("Total: ")) - Score = Numerator/Denominator * 100 +# Checker -if Choice == "P" or Choice == "p": - Score = float(input("Percent: ")) - - -if Score >= 97.5: - print("A+") - -elif Score >= 92.5: - print("A") - -elif Score >= 90.0: - print("A-") - -elif Score >= 87.5: - print("B+") - -elif Score >= 82.5: - print("B") - -elif Score >= 80.0: - print("B-") - -elif Score >= 77.5: - print("C+") +def checker(): + if Score >= 97.5: + print("A+") + + elif Score >= 92.5: + print("A") + + elif Score >= 90.0: + print("A-") + + elif Score >= 87.5: + print("B+") + + elif Score >= 82.5: + print("B") + + elif Score >= 80.0: + print("B-") + + elif Score >= 77.5: + print("C+") + + elif Score >= 72.5: + print("C") + + elif Score >= 70.0: + print("C-") + + elif Score >= 67.5: + print("D+") + + elif Score >= 62.5: + print("D") + + elif Score >= 60.0: + print("D-") + + elif Score < 60.0: + print("F") -elif Score >= 72.5: - print("C") +# End Of Checker -elif Score >= 70.0: - print("C-") +ask = 1 -elif Score >= 67.5: - print("D+") +while ask == 1: + Choice = input("Fraction/Percent [F/P]:") + ask = 0 -elif Score >= 62.5: - print("D") + if Choice == "F" or Choice == "f": + Numerator = float(input("Points: ")) + Denominator = float(input("Total: ")) + Score = Numerator/Denominator * 100 + checker() -elif Score >= 60.0: - print("D-") + if Choice == "P" or Choice == "p": + Score = float(input("Percent: ")) + checker() -elif Score < 60.0: - print("F") + else: + ask = 1 From ce33f12a908193532b438c9d6a5955a89d091914 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 12:59:33 -0500 Subject: [PATCH 114/206] Update gradeconverter.py --- Projects/gradeconverter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Projects/gradeconverter.py b/Projects/gradeconverter.py index f600197..d55dc78 100644 --- a/Projects/gradeconverter.py +++ b/Projects/gradeconverter.py @@ -4,6 +4,7 @@ # Checker def checker(): + if Score >= 97.5: print("A+") From df0c133049989aa46a2319e0823b4db5b9751470 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 16:46:40 -0500 Subject: [PATCH 115/206] Create numberguesser.py --- Projects/numberguesser.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Projects/numberguesser.py diff --git a/Projects/numberguesser.py b/Projects/numberguesser.py new file mode 100644 index 0000000..8809593 --- /dev/null +++ b/Projects/numberguesser.py @@ -0,0 +1,33 @@ +# Imports +from random import * + +# Variables +pasw = 1 +start = 1 +# Code + +password = randint(10000, 100000) +print(password) + +# Easy|Meduim|Hard|Impossible +choice = input("E|M|H|I:") + +if choice == "E": + while pasw == 1: + if start == 1: + print(password) + start = 0 + passwordguess = int(input("Password:")) + if password == passwordguess: + print("Correct!") + password = randint(1, 10) + print(password) + pasw = 1 + elif password > passwordguess: + print("More") + elif password < passwordguess: + print("Less") + elif password != passwordguess: + print("Wrong!") + pasw = 1 + From 4ec06eda8883b7cb4c48552892faf2cb2dcb0430 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 16:48:53 -0500 Subject: [PATCH 116/206] Update numberguesser.py --- Projects/numberguesser.py | 67 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/Projects/numberguesser.py b/Projects/numberguesser.py index 8809593..6012e14 100644 --- a/Projects/numberguesser.py +++ b/Projects/numberguesser.py @@ -4,14 +4,16 @@ # Variables pasw = 1 start = 1 +password = 0 # Code -password = randint(10000, 100000) -print(password) +# password = randint(10000, 100000) +# print(password) # Easy|Meduim|Hard|Impossible choice = input("E|M|H|I:") +# Easy if choice == "E": while pasw == 1: if start == 1: @@ -30,4 +32,63 @@ elif password != passwordguess: print("Wrong!") pasw = 1 - + +# Meduim +if choice == "M": + while pasw == 1: + if start == 1: + print(password) + start = 0 + passwordguess = int(input("Password:")) + if password == passwordguess: + print("Correct!") + password = randint(1, 100) + print(password) + pasw = 1 + elif password > passwordguess: + print("More") + elif password < passwordguess: + print("Less") + elif password != passwordguess: + print("Wrong!") + pasw = 1 + +# Hard +if choice == "H": + while pasw == 1: + if start == 1: + print(password) + start = 0 + passwordguess = int(input("Password:")) + if password == passwordguess: + print("Correct!") + password = randint(1, 1000) + print(password) + pasw = 1 + elif password > passwordguess: + print("More") + elif password < passwordguess: + print("Less") + elif password != passwordguess: + print("Wrong!") + pasw = 1 + +# Impossible +if choice == "I": + while pasw == 1: + if start == 1: + print(password) + start = 0 + passwordguess = int(input("Password:")) + if password == passwordguess: + print("Correct!") + password = randint(10000, 100000) + print(password) + pasw = 1 + elif password > passwordguess: + print("More") + elif password < passwordguess: + print("Less") + elif password != passwordguess: + print("Wrong!") + pasw = 1 From 1e9d7c05fd6f52825322ea8067fc90d77f2ee094 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 16:51:41 -0500 Subject: [PATCH 117/206] Update numberguesser.py --- Projects/numberguesser.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Projects/numberguesser.py b/Projects/numberguesser.py index 6012e14..a16891e 100644 --- a/Projects/numberguesser.py +++ b/Projects/numberguesser.py @@ -5,6 +5,8 @@ pasw = 1 start = 1 password = 0 +# Prints All Passwords (Change to dev = 1 to enable) +dev = 0 # Code # password = randint(10000, 100000) @@ -23,7 +25,8 @@ if password == passwordguess: print("Correct!") password = randint(1, 10) - print(password) + if dev == 1: + print(password) pasw = 1 elif password > passwordguess: print("More") @@ -43,7 +46,8 @@ if password == passwordguess: print("Correct!") password = randint(1, 100) - print(password) + if dev == 1: + print(password) pasw = 1 elif password > passwordguess: print("More") @@ -63,7 +67,8 @@ if password == passwordguess: print("Correct!") password = randint(1, 1000) - print(password) + if dev == 1: + print(password) pasw = 1 elif password > passwordguess: print("More") @@ -83,7 +88,8 @@ if password == passwordguess: print("Correct!") password = randint(10000, 100000) - print(password) + if dev == 1: + print(password) pasw = 1 elif password > passwordguess: print("More") From 49070d14458a9c9f83c0432058a3f1fa44b5c9cd Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 16:52:09 -0500 Subject: [PATCH 118/206] Update numberguesser.py --- Projects/numberguesser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/numberguesser.py b/Projects/numberguesser.py index a16891e..34bef02 100644 --- a/Projects/numberguesser.py +++ b/Projects/numberguesser.py @@ -13,7 +13,7 @@ # print(password) # Easy|Meduim|Hard|Impossible -choice = input("E|M|H|I:") +choice = input("|E|M|H|I|:") # Easy if choice == "E": From bb107d35ddeea9965c2e5cbe2f7a8b7ddceac5cc Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 16:53:36 -0500 Subject: [PATCH 119/206] Rename numberguesser.py to PasswordGuesser.py --- Projects/{numberguesser.py => PasswordGuesser.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Projects/{numberguesser.py => PasswordGuesser.py} (100%) diff --git a/Projects/numberguesser.py b/Projects/PasswordGuesser.py similarity index 100% rename from Projects/numberguesser.py rename to Projects/PasswordGuesser.py From 8048f818566b6ffe3658890ad0594ee78d16d94e Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 16:55:50 -0500 Subject: [PATCH 120/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 34bef02..ba9df59 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -8,11 +8,11 @@ # Prints All Passwords (Change to dev = 1 to enable) dev = 0 # Code - -# password = randint(10000, 100000) -# print(password) +if start == 1: + print("Welcome to Password Guesser!") + print("|Easy|Meduim|Hard|Impossible|") -# Easy|Meduim|Hard|Impossible +# |Easy|Meduim|Hard|Impossible| choice = input("|E|M|H|I|:") # Easy From e408b03f48789d6d2974d0518d1a2470be1b511c Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 17:03:58 -0500 Subject: [PATCH 121/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index ba9df59..11d6cae 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -5,6 +5,7 @@ pasw = 1 start = 1 password = 0 +diff = 1 # Prints All Passwords (Change to dev = 1 to enable) dev = 0 # Code @@ -13,10 +14,13 @@ print("|Easy|Meduim|Hard|Impossible|") # |Easy|Meduim|Hard|Impossible| -choice = input("|E|M|H|I|:") +while diff == 1: + choice = input("|E|M|H|I|:") + diff = 0 # Easy if choice == "E": + diff = 0 while pasw == 1: if start == 1: print(password) @@ -38,6 +42,7 @@ # Meduim if choice == "M": + diff = 0 while pasw == 1: if start == 1: print(password) @@ -59,6 +64,7 @@ # Hard if choice == "H": + diff = 0 while pasw == 1: if start == 1: print(password) @@ -80,6 +86,7 @@ # Impossible if choice == "I": + diff = 0 while pasw == 1: if start == 1: print(password) @@ -98,3 +105,6 @@ elif password != passwordguess: print("Wrong!") pasw = 1 + +else: + print("Please Retry") From a7319c832f63cfb790279233cf96f00ee57b4261 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 17:11:38 -0500 Subject: [PATCH 122/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 11d6cae..6a7098a 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -11,11 +11,11 @@ # Code if start == 1: print("Welcome to Password Guesser!") - print("|Easy|Meduim|Hard|Impossible|") + print("|Easy|Meduim|Hard|Impossible|Custom|") -# |Easy|Meduim|Hard|Impossible| +# |Easy|Meduim|Hard|Impossible|Custom| while diff == 1: - choice = input("|E|M|H|I|:") + choice = input("|E|M|H|I|C|:") diff = 0 # Easy @@ -106,5 +106,29 @@ print("Wrong!") pasw = 1 +# Custom +if choice == "C": + diff = 0 + while pasw == 1: + if start == 1: + print(password) + start = 0 + passwordguess = int(input("Password:")) + if password == passwordguess: + print("Correct!") + devx = int(input("X: ")) + devy = int(input("Y: ")) + password = randint(devx, devy) + if dev == 1: + print(password) + pasw = 1 + elif password > passwordguess: + print("More") + elif password < passwordguess: + print("Less") + elif password != passwordguess: + print("Wrong!") + pasw = 1 + else: print("Please Retry") From 93a23b4d5245cd8294f7115062422e1eb2516246 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 17:16:57 -0500 Subject: [PATCH 123/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 6a7098a..4f7ce07 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -6,6 +6,7 @@ start = 1 password = 0 diff = 1 +guesscount = 1 # Prints All Passwords (Change to dev = 1 to enable) dev = 0 # Code @@ -28,14 +29,17 @@ passwordguess = int(input("Password:")) if password == passwordguess: print("Correct!") + print("You guessed the password in", guesscount, "tries") password = randint(1, 10) if dev == 1: print(password) pasw = 1 elif password > passwordguess: print("More") + guesscount += 1 elif password < passwordguess: print("Less") + guesscount += 1 elif password != passwordguess: print("Wrong!") pasw = 1 @@ -50,14 +54,17 @@ passwordguess = int(input("Password:")) if password == passwordguess: print("Correct!") + print("You guessed the password in", guesscount, "tries") password = randint(1, 100) if dev == 1: print(password) pasw = 1 elif password > passwordguess: print("More") + guesscount += 1 elif password < passwordguess: print("Less") + guesscount += 1 elif password != passwordguess: print("Wrong!") pasw = 1 @@ -72,14 +79,17 @@ passwordguess = int(input("Password:")) if password == passwordguess: print("Correct!") + print("You guessed the password in", guesscount, "tries") password = randint(1, 1000) if dev == 1: print(password) pasw = 1 elif password > passwordguess: print("More") + guesscount += 1 elif password < passwordguess: print("Less") + guesscount += 1 elif password != passwordguess: print("Wrong!") pasw = 1 @@ -94,14 +104,17 @@ passwordguess = int(input("Password:")) if password == passwordguess: print("Correct!") + print("You guessed the password in", guesscount, "tries") password = randint(10000, 100000) if dev == 1: print(password) pasw = 1 elif password > passwordguess: print("More") + guesscount += 1 elif password < passwordguess: print("Less") + guesscount += 1 elif password != passwordguess: print("Wrong!") pasw = 1 @@ -116,6 +129,7 @@ passwordguess = int(input("Password:")) if password == passwordguess: print("Correct!") + print("You guessed the password in", guesscount, "tries") devx = int(input("X: ")) devy = int(input("Y: ")) password = randint(devx, devy) @@ -124,8 +138,10 @@ pasw = 1 elif password > passwordguess: print("More") + guesscount += 1 elif password < passwordguess: print("Less") + guesscount += 1 elif password != passwordguess: print("Wrong!") pasw = 1 From 2f54e313ea2ee229365b6b14f9ea4bccda448ffa Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 17:17:52 -0500 Subject: [PATCH 124/206] Update PasswordGuesser.py From 4724471c1fc25ceb48342cfa82b46c06b82563c8 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 19:43:36 -0500 Subject: [PATCH 125/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 4f7ce07..7dc7d5e 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -30,6 +30,7 @@ if password == passwordguess: print("Correct!") print("You guessed the password in", guesscount, "tries") + guesscount = 0 password = randint(1, 10) if dev == 1: print(password) @@ -55,6 +56,7 @@ if password == passwordguess: print("Correct!") print("You guessed the password in", guesscount, "tries") + guesscount = 0 password = randint(1, 100) if dev == 1: print(password) @@ -80,6 +82,7 @@ if password == passwordguess: print("Correct!") print("You guessed the password in", guesscount, "tries") + guesscount = 0 password = randint(1, 1000) if dev == 1: print(password) @@ -105,6 +108,7 @@ if password == passwordguess: print("Correct!") print("You guessed the password in", guesscount, "tries") + guesscount = 0 password = randint(10000, 100000) if dev == 1: print(password) @@ -129,6 +133,7 @@ passwordguess = int(input("Password:")) if password == passwordguess: print("Correct!") + guesscount = 0 print("You guessed the password in", guesscount, "tries") devx = int(input("X: ")) devy = int(input("Y: ")) From bcc4df60cffb4c17a9bd35b2ae5dfe33ed78c3a2 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 20:01:36 -0500 Subject: [PATCH 126/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 7dc7d5e..35ca6d2 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -13,7 +13,8 @@ if start == 1: print("Welcome to Password Guesser!") print("|Easy|Meduim|Hard|Impossible|Custom|") - +if dev == 1: + print("You are a developer!") # |Easy|Meduim|Hard|Impossible|Custom| while diff == 1: choice = input("|E|M|H|I|C|:") From f52cb679ee7f88795e82fca36c557d76495add66 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 20:02:41 -0500 Subject: [PATCH 127/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 35ca6d2..0c7a04a 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -134,8 +134,8 @@ passwordguess = int(input("Password:")) if password == passwordguess: print("Correct!") - guesscount = 0 print("You guessed the password in", guesscount, "tries") + guesscount = 0 devx = int(input("X: ")) devy = int(input("Y: ")) password = randint(devx, devy) From 7407434c13bc404836e0df5a47cedc659ae9626f Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 9 Nov 2017 20:21:05 -0500 Subject: [PATCH 128/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 0c7a04a..bcd317f 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -9,6 +9,7 @@ guesscount = 1 # Prints All Passwords (Change to dev = 1 to enable) dev = 0 + # Code if start == 1: print("Welcome to Password Guesser!") From 9b126c6a611a7374e24efd885cc749a73a44fce6 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 07:12:43 -0500 Subject: [PATCH 129/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index bcd317f..143468d 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -26,7 +26,7 @@ diff = 0 while pasw == 1: if start == 1: - print(password) + password = randint(1, 10) start = 0 passwordguess = int(input("Password:")) if password == passwordguess: @@ -52,7 +52,7 @@ diff = 0 while pasw == 1: if start == 1: - print(password) + password = randint(1, 100) start = 0 passwordguess = int(input("Password:")) if password == passwordguess: @@ -78,7 +78,7 @@ diff = 0 while pasw == 1: if start == 1: - print(password) + password = randint(1, 1000) start = 0 passwordguess = int(input("Password:")) if password == passwordguess: @@ -104,7 +104,7 @@ diff = 0 while pasw == 1: if start == 1: - print(password) + password = randint(10000, 100000) start = 0 passwordguess = int(input("Password:")) if password == passwordguess: @@ -130,7 +130,9 @@ diff = 0 while pasw == 1: if start == 1: - print(password) + devx = int(input("X: ")) + devy = int(input("Y: ")) + password = randint(devx, devy) start = 0 passwordguess = int(input("Password:")) if password == passwordguess: From 49ebd2ba87a551bdc88af7b7d0299f0c32a5a02c Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 07:25:42 -0500 Subject: [PATCH 130/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 143468d..9c2b626 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -6,17 +6,17 @@ start = 1 password = 0 diff = 1 -guesscount = 1 +guesscount = 0 # Prints All Passwords (Change to dev = 1 to enable) dev = 0 # Code if start == 1: print("Welcome to Password Guesser!") - print("|Easy|Meduim|Hard|Impossible|Custom|") + print("|Easy|Medium|Hard|Impossible|Custom|") if dev == 1: print("You are a developer!") -# |Easy|Meduim|Hard|Impossible|Custom| +# |Easy|Medium|Hard|Impossible|Custom| while diff == 1: choice = input("|E|M|H|I|C|:") diff = 0 @@ -27,6 +27,7 @@ while pasw == 1: if start == 1: password = randint(1, 10) + print("Easy Mode is between 1 and 10") start = 0 passwordguess = int(input("Password:")) if password == passwordguess: @@ -47,12 +48,13 @@ print("Wrong!") pasw = 1 -# Meduim +# Medium if choice == "M": diff = 0 while pasw == 1: if start == 1: password = randint(1, 100) + print("Medium Mode is between 1 and 100") start = 0 passwordguess = int(input("Password:")) if password == passwordguess: @@ -79,6 +81,7 @@ while pasw == 1: if start == 1: password = randint(1, 1000) + print("Hard Mode is between 1 and 1000") start = 0 passwordguess = int(input("Password:")) if password == passwordguess: @@ -104,14 +107,15 @@ diff = 0 while pasw == 1: if start == 1: - password = randint(10000, 100000) + password = randint(1, 10000) + print("Impossible Mode is between 1 and 10000") start = 0 passwordguess = int(input("Password:")) if password == passwordguess: print("Correct!") print("You guessed the password in", guesscount, "tries") guesscount = 0 - password = randint(10000, 100000) + password = randint(1, 10000) if dev == 1: print(password) pasw = 1 @@ -133,6 +137,7 @@ devx = int(input("X: ")) devy = int(input("Y: ")) password = randint(devx, devy) + print("Custom Mode is between", devx, "and", devy) start = 0 passwordguess = int(input("Password:")) if password == passwordguess: @@ -141,6 +146,7 @@ guesscount = 0 devx = int(input("X: ")) devy = int(input("Y: ")) + print("Custom Mode is between", devx, "and", devy) password = randint(devx, devy) if dev == 1: print(password) From 8892bfe7dd98dbb49f66ba1b2af678f09a7fa603 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 07:39:44 -0500 Subject: [PATCH 131/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 46 +++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 9c2b626..974c804 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -13,12 +13,12 @@ # Code if start == 1: print("Welcome to Password Guesser!") - print("|Easy|Medium|Hard|Impossible|Custom|") + print("|Easy|Medium|Hard|Impossible|Custom|Learn|") if dev == 1: print("You are a developer!") -# |Easy|Medium|Hard|Impossible|Custom| +# |Easy|Medium|Hard|Impossible|Custom|Learn| while diff == 1: - choice = input("|E|M|H|I|C|:") + choice = input("|E|M|H|I|C|L|:") diff = 0 # Easy @@ -160,6 +160,44 @@ elif password != passwordguess: print("Wrong!") pasw = 1 - + +# Learn +if choice == "L": + diff = 0 + while pasw == 1: + if start == 1: + password = randint(1, 10) + print("Choose a number between 1 and 10") + lesson = 1 + start = 2 + passwordguess = int(input("Password:")) + if password == passwordguess: + print("Correct!") + print("You guessed the password in", guesscount, "tries") + if lesson == 1: + if guesscount < 5: + print("You completed the level!") + lesson = 2 + if guesscount > 5: + print("You failed the level!") + print("To complete the level, use less than 5 tries") + password = randint(1, 10) + print("Choose a number between 1 and 10") + guesscount = 0 + if lesson == 2: + password = randint(1, 100) + print("Choose a number between 1 and 100") + if dev == 1: + print(password) + pasw = 1 + elif password > passwordguess: + print("More") + guesscount += 1 + elif password < passwordguess: + print("Less") + guesscount += 1 + elif password != passwordguess: + print("Wrong!") + pasw = 1 else: print("Please Retry") From 6f6d00cfc689f7464778e5855a8d57128cc26f91 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 07:59:55 -0500 Subject: [PATCH 132/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 974c804..14630c6 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -170,6 +170,9 @@ print("Choose a number between 1 and 10") lesson = 1 start = 2 + if lesson == 2: + password = randint(1, 100) + print("Choose a number between 1 and 100") passwordguess = int(input("Password:")) if password == passwordguess: print("Correct!") @@ -183,10 +186,17 @@ print("To complete the level, use less than 5 tries") password = randint(1, 10) print("Choose a number between 1 and 10") - guesscount = 0 + if lesson == 2: - password = randint(1, 100) - print("Choose a number between 1 and 100") + if guesscount < 10: + print("You completed the level!") + lesson = 2 + if guesscount > 10: + print("You failed the level!") + print("To complete the level, use less than 10 tries") + password = randint(1, 100) + print("Choose a number between 1 and 100") + guesscount = 0 if dev == 1: print(password) pasw = 1 From fd95fffe94617d98941f623d9914336c303de945 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 08:31:04 -0500 Subject: [PATCH 133/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 44 +++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 14630c6..472fe7e 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -6,7 +6,8 @@ start = 1 password = 0 diff = 1 -guesscount = 0 +guesscount = 1 +less = 1 # Prints All Passwords (Change to dev = 1 to enable) dev = 0 @@ -170,9 +171,6 @@ print("Choose a number between 1 and 10") lesson = 1 start = 2 - if lesson == 2: - password = randint(1, 100) - print("Choose a number between 1 and 100") passwordguess = int(input("Password:")) if password == passwordguess: print("Correct!") @@ -180,6 +178,7 @@ if lesson == 1: if guesscount < 5: print("You completed the level!") + guesscount = 1 lesson = 2 if guesscount > 5: print("You failed the level!") @@ -188,15 +187,38 @@ print("Choose a number between 1 and 10") if lesson == 2: - if guesscount < 10: - print("You completed the level!") - lesson = 2 - if guesscount > 10: - print("You failed the level!") - print("To complete the level, use less than 10 tries") + if less == 1: password = randint(1, 100) print("Choose a number between 1 and 100") - guesscount = 0 + less = 0 + if password == passwordguess: + if guesscount < 10: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 3 + if guesscount > 10: + print("You failed the level!") + print("To complete the level, use less than 10 tries") + password = randint(1, 100) + print("Choose a number between 1 and 100") + + if lesson == 3: + if less == 1: + password = randint(1, 1000) + print("Choose a number between 1 and 1000") + less = 0 + if password == passwordguess: + if guesscount < 20: + print("You completed the level!") + guesscount = 1 + lesson = 4 + if guesscount > 20: + print("You failed the level!") + print("To complete the level, use less than 10 tries") + password = randint(1, 1000) + print("Choose a number between 1 and 1000") + guesscount = 1 if dev == 1: print(password) pasw = 1 From daa770f2aab9670031b98813c645a9c86f4373f8 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 08:47:02 -0500 Subject: [PATCH 134/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 44 +++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 472fe7e..4721e37 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -176,7 +176,7 @@ print("Correct!") print("You guessed the password in", guesscount, "tries") if lesson == 1: - if guesscount < 5: + if guesscount <= 5: print("You completed the level!") guesscount = 1 lesson = 2 @@ -192,7 +192,7 @@ print("Choose a number between 1 and 100") less = 0 if password == passwordguess: - if guesscount < 10: + if guesscount <= 10: print("You completed the level!") guesscount = 1 less = 1 @@ -209,15 +209,51 @@ print("Choose a number between 1 and 1000") less = 0 if password == passwordguess: - if guesscount < 20: + if guesscount <= 20: print("You completed the level!") guesscount = 1 + less = 1 lesson = 4 if guesscount > 20: print("You failed the level!") - print("To complete the level, use less than 10 tries") + print("To complete the level, use less than 20 tries") password = randint(1, 1000) print("Choose a number between 1 and 1000") + + if lesson == 4: + if less == 1: + password = randint(1, 10000) + print("Choose a number between 1 and 10000") + less = 0 + if password == passwordguess: + if guesscount <= 40: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 5 + if guesscount > 40: + print("You failed the level!") + print("To complete the level, use less than 40 tries") + password = randint(1, 10000) + print("Choose a number between 1 and 10000") + + if lesson == 5: + if less == 1: + password = randint(1, 100000) + print("Choose a number between 1 and 100000") + less = 0 + if password == passwordguess: + if guesscount <= 80: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 5 + if guesscount > 80: + print("You failed the level!") + print("To complete the level, use less than 40 tries") + password = randint(1, 100000) + print("Choose a number between 1 and 100000") + guesscount = 1 if dev == 1: print(password) From 84eb6905d4e384784cd26c1a8ad4269ca928cea4 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 08:53:27 -0500 Subject: [PATCH 135/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 4721e37..14d46cf 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -247,13 +247,30 @@ print("You completed the level!") guesscount = 1 less = 1 - lesson = 5 + lesson = 6 if guesscount > 80: print("You failed the level!") - print("To complete the level, use less than 40 tries") + print("To complete the level, use less than 80 tries") password = randint(1, 100000) print("Choose a number between 1 and 100000") + if lesson == 6: + if less == 1: + password = randint(1, 1000000) + print("Choose a number between 1 and 1000000") + less = 0 + if password == passwordguess: + if guesscount <= 160: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 6 + if guesscount > 160: + print("You failed the level!") + print("To complete the level, use less than 160 tries") + password = randint(1, 1000000) + print("Choose a number between 1 and 1000000") + guesscount = 1 if dev == 1: print(password) From e121f75d79a8c64e89fe18e72198fb3cf8389b72 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 08:56:43 -0500 Subject: [PATCH 136/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 14d46cf..27dea5a 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -183,6 +183,7 @@ if guesscount > 5: print("You failed the level!") print("To complete the level, use less than 5 tries") + guesscount = 1 password = randint(1, 10) print("Choose a number between 1 and 10") @@ -200,6 +201,7 @@ if guesscount > 10: print("You failed the level!") print("To complete the level, use less than 10 tries") + guesscount = 1 password = randint(1, 100) print("Choose a number between 1 and 100") @@ -217,6 +219,7 @@ if guesscount > 20: print("You failed the level!") print("To complete the level, use less than 20 tries") + guesscount = 1 password = randint(1, 1000) print("Choose a number between 1 and 1000") @@ -234,6 +237,7 @@ if guesscount > 40: print("You failed the level!") print("To complete the level, use less than 40 tries") + guesscount = 1 password = randint(1, 10000) print("Choose a number between 1 and 10000") @@ -251,6 +255,7 @@ if guesscount > 80: print("You failed the level!") print("To complete the level, use less than 80 tries") + guesscount = 1 password = randint(1, 100000) print("Choose a number between 1 and 100000") @@ -268,6 +273,7 @@ if guesscount > 160: print("You failed the level!") print("To complete the level, use less than 160 tries") + guesscount = 1 password = randint(1, 1000000) print("Choose a number between 1 and 1000000") From 8dc52a75bf14b17a6797aabc4dc707f285fa6b0c Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 09:07:33 -0500 Subject: [PATCH 137/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 27dea5a..888a298 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -168,6 +168,8 @@ while pasw == 1: if start == 1: password = randint(1, 10) + if dev == 1: + print(password) print("Choose a number between 1 and 10") lesson = 1 start = 2 @@ -185,11 +187,15 @@ print("To complete the level, use less than 5 tries") guesscount = 1 password = randint(1, 10) + if dev == 1: + print(password) print("Choose a number between 1 and 10") if lesson == 2: if less == 1: password = randint(1, 100) + if dev == 1: + print(password) print("Choose a number between 1 and 100") less = 0 if password == passwordguess: @@ -203,11 +209,15 @@ print("To complete the level, use less than 10 tries") guesscount = 1 password = randint(1, 100) + if dev == 1: + print(password) print("Choose a number between 1 and 100") if lesson == 3: if less == 1: password = randint(1, 1000) + if dev == 1: + print(password) print("Choose a number between 1 and 1000") less = 0 if password == passwordguess: @@ -221,11 +231,15 @@ print("To complete the level, use less than 20 tries") guesscount = 1 password = randint(1, 1000) + if dev == 1: + print(password) print("Choose a number between 1 and 1000") if lesson == 4: if less == 1: password = randint(1, 10000) + if dev == 1: + print(password) print("Choose a number between 1 and 10000") less = 0 if password == passwordguess: @@ -239,11 +253,15 @@ print("To complete the level, use less than 40 tries") guesscount = 1 password = randint(1, 10000) + if dev == 1: + print(password) print("Choose a number between 1 and 10000") if lesson == 5: if less == 1: password = randint(1, 100000) + if dev == 1: + print(password) print("Choose a number between 1 and 100000") less = 0 if password == passwordguess: @@ -257,24 +275,32 @@ print("To complete the level, use less than 80 tries") guesscount = 1 password = randint(1, 100000) + if dev == 1: + print(password) print("Choose a number between 1 and 100000") if lesson == 6: if less == 1: password = randint(1, 1000000) + if dev == 1: + print(password) print("Choose a number between 1 and 1000000") less = 0 if password == passwordguess: if guesscount <= 160: print("You completed the level!") + print("You completed Learn Mode!") + print("Try Custom Mode if you want to make your own range") guesscount = 1 less = 1 - lesson = 6 + lesson = 0 if guesscount > 160: print("You failed the level!") print("To complete the level, use less than 160 tries") guesscount = 1 password = randint(1, 1000000) + if dev == 1: + print(password) print("Choose a number between 1 and 1000000") guesscount = 1 From 5ec2950401091dbe541b8df055499e4bb7300cce Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 09:15:21 -0500 Subject: [PATCH 138/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 65 +++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 6 deletions(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 888a298..f5b7d52 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -14,12 +14,12 @@ # Code if start == 1: print("Welcome to Password Guesser!") - print("|Easy|Medium|Hard|Impossible|Custom|Learn|") + print("|Easy|Medium|Hard|VeryHard|Extreme|Impossible|Custom|Learn|") if dev == 1: print("You are a developer!") -# |Easy|Medium|Hard|Impossible|Custom|Learn| +# |Easy|Medium|Hard|VeryHard|Extreme|Impossible|Custom|Learn| while diff == 1: - choice = input("|E|M|H|I|C|L|:") + choice = input("|E|M|H|VH|EX|I|C|L|:") diff = 0 # Easy @@ -103,13 +103,13 @@ print("Wrong!") pasw = 1 -# Impossible -if choice == "I": +# VeryHard +if choice == "VH": diff = 0 while pasw == 1: if start == 1: password = randint(1, 10000) - print("Impossible Mode is between 1 and 10000") + print("VeryHard Mode is between 1 and 10000") start = 0 passwordguess = int(input("Password:")) if password == passwordguess: @@ -129,6 +129,59 @@ elif password != passwordguess: print("Wrong!") pasw = 1 +# Extreme +if choice == "EX": + diff = 0 + while pasw == 1: + if start == 1: + password = randint(1, 100000) + print("Extreme Mode is between 1 and 100000") + start = 0 + passwordguess = int(input("Password:")) + if password == passwordguess: + print("Correct!") + print("You guessed the password in", guesscount, "tries") + guesscount = 0 + password = randint(1, 100000) + if dev == 1: + print(password) + pasw = 1 + elif password > passwordguess: + print("More") + guesscount += 1 + elif password < passwordguess: + print("Less") + guesscount += 1 + elif password != passwordguess: + print("Wrong!") + pasw = 1 + +# Impossible +if choice == "I": + diff = 0 + while pasw == 1: + if start == 1: + password = randint(1, 1000000) + print("Impossible Mode is between 1 and 1000000") + start = 0 + passwordguess = int(input("Password:")) + if password == passwordguess: + print("Correct!") + print("You guessed the password in", guesscount, "tries") + guesscount = 0 + password = randint(1, 1000000) + if dev == 1: + print(password) + pasw = 1 + elif password > passwordguess: + print("More") + guesscount += 1 + elif password < passwordguess: + print("Less") + guesscount += 1 + elif password != passwordguess: + print("Wrong!") + pasw = 1 # Custom if choice == "C": From 7cf2548d4327f3c6b524f7a2f6a6826870f758e4 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 09:17:42 -0500 Subject: [PATCH 139/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index f5b7d52..87bdd7b 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -14,12 +14,12 @@ # Code if start == 1: print("Welcome to Password Guesser!") - print("|Easy|Medium|Hard|VeryHard|Extreme|Impossible|Custom|Learn|") + print("|Easy|Medium|Hard|VeryHard|Extreme|Impossible|Impossible2|Custom|Learn|") if dev == 1: print("You are a developer!") -# |Easy|Medium|Hard|VeryHard|Extreme|Impossible|Custom|Learn| +# |Easy|Medium|Hard|VeryHard|Extreme|Impossible|Impossible2|Custom|Learn| while diff == 1: - choice = input("|E|M|H|VH|EX|I|C|L|:") + choice = input("|E|M|H|VH|EX|I|I2|C|L|:") diff = 0 # Easy @@ -182,6 +182,34 @@ elif password != passwordguess: print("Wrong!") pasw = 1 + +# Impossible 2 +if choice == "I2": + diff = 0 + while pasw == 1: + if start == 1: + password = randint(1, 10000000) + print("Impossible2 Mode is between 1 and 10000000") + start = 0 + passwordguess = int(input("Password:")) + if password == passwordguess: + print("Correct!") + print("You guessed the password in", guesscount, "tries") + guesscount = 0 + password = randint(1, 10000000) + if dev == 1: + print(password) + pasw = 1 + elif password > passwordguess: + print("More") + guesscount += 1 + elif password < passwordguess: + print("Less") + guesscount += 1 + elif password != passwordguess: + print("Wrong!") + pasw = 1 + # Custom if choice == "C": From a5b730d5759d55bb3b71b29bbb076b1993735922 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 09:31:56 -0500 Subject: [PATCH 140/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 87bdd7b..974eb4b 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -17,7 +17,7 @@ print("|Easy|Medium|Hard|VeryHard|Extreme|Impossible|Impossible2|Custom|Learn|") if dev == 1: print("You are a developer!") -# |Easy|Medium|Hard|VeryHard|Extreme|Impossible|Impossible2|Custom|Learn| +# |Easy(1-10)|Medium(1-100)|Hard(1-100)|VeryHard(1-1000)|Extreme(1-10000)|Impossible(1-100000)|Impossible2(1-1000000)|Custom|Learn| while diff == 1: choice = input("|E|M|H|VH|EX|I|I2|C|L|:") diff = 0 From 72417e301db9a2b6560388232bfb0974d7fe712a Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 09:34:36 -0500 Subject: [PATCH 141/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 974eb4b..584aa76 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -14,12 +14,12 @@ # Code if start == 1: print("Welcome to Password Guesser!") - print("|Easy|Medium|Hard|VeryHard|Extreme|Impossible|Impossible2|Custom|Learn|") + print("|Easy|Medium|Hard|VeryHard|Extreme|Impossible|Impossible2|Impossible3|Custom|Learn|") if dev == 1: print("You are a developer!") -# |Easy(1-10)|Medium(1-100)|Hard(1-100)|VeryHard(1-1000)|Extreme(1-10000)|Impossible(1-100000)|Impossible2(1-1000000)|Custom|Learn| +# |Easy(1-10)|Medium(1-100)|Hard(1-100)|VeryHard(1-1000)|Extreme(1-10000)|Impossible(1-100000)|Impossible2(1-1000000)|Impossible3(1-100000000)Custom|Learn| while diff == 1: - choice = input("|E|M|H|VH|EX|I|I2|C|L|:") + choice = input("|E|M|H|VH|EX|I|I2|I3|C|L|:") diff = 0 # Easy @@ -209,8 +209,35 @@ elif password != passwordguess: print("Wrong!") pasw = 1 - +# Impossible 3 +if choice == "I3": + diff = 0 + while pasw == 1: + if start == 1: + password = randint(1, 100000000) + print("Impossible2 Mode is between 1 and 100000000") + start = 0 + passwordguess = int(input("Password:")) + if password == passwordguess: + print("Correct!") + print("You guessed the password in", guesscount, "tries") + guesscount = 0 + password = randint(1, 100000000) + if dev == 1: + print(password) + pasw = 1 + elif password > passwordguess: + print("More") + guesscount += 1 + elif password < passwordguess: + print("Less") + guesscount += 1 + elif password != passwordguess: + print("Wrong!") + pasw = 1 + + # Custom if choice == "C": diff = 0 From 7286693fd56d7b4388550b2ef2e98910d0262371 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 09:35:50 -0500 Subject: [PATCH 142/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 584aa76..81b28a3 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -216,7 +216,7 @@ while pasw == 1: if start == 1: password = randint(1, 100000000) - print("Impossible2 Mode is between 1 and 100000000") + print("Impossible3 Mode is between 1 and 100000000") start = 0 passwordguess = int(input("Password:")) if password == passwordguess: From ab1e88fb10baa631e42cf8c41ab42f3ae9a9b201 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 14:18:43 -0500 Subject: [PATCH 143/206] Create PyCmd2.0.py --- Projects/PyCmd2.0.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Projects/PyCmd2.0.py diff --git a/Projects/PyCmd2.0.py b/Projects/PyCmd2.0.py new file mode 100644 index 0000000..3d231d7 --- /dev/null +++ b/Projects/PyCmd2.0.py @@ -0,0 +1,36 @@ +# Imports +from random import * + +# Variables +adminuser = "Admin" +adminpass = "Admin" + +# Define + +# Console +def console(): + command = input(":") + +# Login +def login(): + username = input("Username: ") + password = input("Password: ") + if username == "Admin" and password == "Admin": + print("Authentication Success") + + elif username == "Guest" and password == "Guest": + print("Authentication Success") + + else: + print("Authentication Failed") + +# Number Generator +def numgen(): + number = randint(1, 10) + + +# Code +print("Welcome to PyCmd 2.0!") +loginchoice = input("Would you like to login?") + + From dca4b600b737a23503531496b7bbb7aa4f383b37 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 14:20:47 -0500 Subject: [PATCH 144/206] Rename PyCmd2.0.py to PyCmd2.py --- Projects/{PyCmd2.0.py => PyCmd2.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Projects/{PyCmd2.0.py => PyCmd2.py} (100%) diff --git a/Projects/PyCmd2.0.py b/Projects/PyCmd2.py similarity index 100% rename from Projects/PyCmd2.0.py rename to Projects/PyCmd2.py From a4b132f084b8b4475d241edc80809e1068bcd8b8 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 14:21:02 -0500 Subject: [PATCH 145/206] Update PyCmd2.py --- Projects/PyCmd2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/PyCmd2.py b/Projects/PyCmd2.py index 3d231d7..c810efd 100644 --- a/Projects/PyCmd2.py +++ b/Projects/PyCmd2.py @@ -30,7 +30,7 @@ def numgen(): # Code -print("Welcome to PyCmd 2.0!") +print("Welcome to PyCmd 2!") loginchoice = input("Would you like to login?") From f412369acfa4cf1aaf0dc891bf71dd34dd4e8594 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 14:50:38 -0500 Subject: [PATCH 146/206] Delete PyCmd2.py --- Projects/PyCmd2.py | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 Projects/PyCmd2.py diff --git a/Projects/PyCmd2.py b/Projects/PyCmd2.py deleted file mode 100644 index c810efd..0000000 --- a/Projects/PyCmd2.py +++ /dev/null @@ -1,36 +0,0 @@ -# Imports -from random import * - -# Variables -adminuser = "Admin" -adminpass = "Admin" - -# Define - -# Console -def console(): - command = input(":") - -# Login -def login(): - username = input("Username: ") - password = input("Password: ") - if username == "Admin" and password == "Admin": - print("Authentication Success") - - elif username == "Guest" and password == "Guest": - print("Authentication Success") - - else: - print("Authentication Failed") - -# Number Generator -def numgen(): - number = randint(1, 10) - - -# Code -print("Welcome to PyCmd 2!") -loginchoice = input("Would you like to login?") - - From 69a4ed20bf07ff837c298a896719b786d197f6eb Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 15:06:41 -0500 Subject: [PATCH 147/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index 81b28a3..b1a5704 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -1,5 +1,7 @@ # Imports from random import * +from time import sleep +import sys # Variables pasw = 1 @@ -13,8 +15,16 @@ # Code if start == 1: - print("Welcome to Password Guesser!") - print("|Easy|Medium|Hard|VeryHard|Extreme|Impossible|Impossible2|Impossible3|Custom|Learn|") + text = "Welcome to Password Guesser!" + for character in text: + sys.stdout.write(character) + sleep(0.2) + print("\n") + text = "|Easy|Medium|Hard|VeryHard|Extreme|Impossible|Impossible2|Impossible3|Custom|Learn|" + for character in text: + sys.stdout.write(character) + sleep(0.05) + print("\n") if dev == 1: print("You are a developer!") # |Easy(1-10)|Medium(1-100)|Hard(1-100)|VeryHard(1-1000)|Extreme(1-10000)|Impossible(1-100000)|Impossible2(1-1000000)|Impossible3(1-100000000)Custom|Learn| From b19d3a284af71c6fe76f3000815d79ce403e0efb Mon Sep 17 00:00:00 2001 From: Nathan R Date: Fri, 10 Nov 2017 15:09:46 -0500 Subject: [PATCH 148/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index b1a5704..bdc4eed 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -26,7 +26,11 @@ sleep(0.05) print("\n") if dev == 1: - print("You are a developer!") + text = "You are a developer!" + for character in text: + sys.stdout.write(character) + sleep(0.05) + print("\n") # |Easy(1-10)|Medium(1-100)|Hard(1-100)|VeryHard(1-1000)|Extreme(1-10000)|Impossible(1-100000)|Impossible2(1-1000000)|Impossible3(1-100000000)Custom|Learn| while diff == 1: choice = input("|E|M|H|VH|EX|I|I2|I3|C|L|:") From 16974871e4b995b28c10b6a1582b8fc2bf0ee39b Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 11:31:49 -0500 Subject: [PATCH 149/206] Update PasswordGuesser.py --- Projects/PasswordGuesser.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Projects/PasswordGuesser.py b/Projects/PasswordGuesser.py index bdc4eed..1dc9686 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/PasswordGuesser.py @@ -15,7 +15,12 @@ # Code if start == 1: - text = "Welcome to Password Guesser!" + text = "Welcome to Password Guesser" + for character in text: + sys.stdout.write(character) + sleep(0.2) + print("\n") + text = "Created by Nathan R (Mosrod)" for character in text: sys.stdout.write(character) sleep(0.2) From 84206bb850277496e672050c957211cd1d0fd67f Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 11:36:34 -0500 Subject: [PATCH 150/206] Update and rename PasswordGuesser.py to NumberGuesser.py --- .../{PasswordGuesser.py => NumberGuesser.py} | 240 +++++++++--------- 1 file changed, 120 insertions(+), 120 deletions(-) rename Projects/{PasswordGuesser.py => NumberGuesser.py} (63%) diff --git a/Projects/PasswordGuesser.py b/Projects/NumberGuesser.py similarity index 63% rename from Projects/PasswordGuesser.py rename to Projects/NumberGuesser.py index 1dc9686..0d29a33 100644 --- a/Projects/PasswordGuesser.py +++ b/Projects/NumberGuesser.py @@ -6,16 +6,16 @@ # Variables pasw = 1 start = 1 -password = 0 +number = 0 diff = 1 guesscount = 1 less = 1 -# Prints All Passwords (Change to dev = 1 to enable) +# Prints All Numbers (Change to dev = 1 to enable) dev = 0 # Code if start == 1: - text = "Welcome to Password Guesser" + text = "Welcome to Number Guesser" for character in text: sys.stdout.write(character) sleep(0.2) @@ -46,25 +46,25 @@ diff = 0 while pasw == 1: if start == 1: - password = randint(1, 10) + number = randint(1, 10) print("Easy Mode is between 1 and 10") start = 0 - passwordguess = int(input("Password:")) - if password == passwordguess: + numberguess = int(input("Number:")) + if number == numberguess: print("Correct!") - print("You guessed the password in", guesscount, "tries") + print("You guessed the number in", guesscount, "tries") guesscount = 0 - password = randint(1, 10) + number = randint(1, 10) if dev == 1: - print(password) + print(number) pasw = 1 - elif password > passwordguess: + elif number > numberguess: print("More") guesscount += 1 - elif password < passwordguess: + elif number < numberguess: print("Less") guesscount += 1 - elif password != passwordguess: + elif number != numberguess: print("Wrong!") pasw = 1 @@ -73,25 +73,25 @@ diff = 0 while pasw == 1: if start == 1: - password = randint(1, 100) + number = randint(1, 100) print("Medium Mode is between 1 and 100") start = 0 - passwordguess = int(input("Password:")) - if password == passwordguess: + numberguess = int(input("Number:")) + if number == numberguess: print("Correct!") - print("You guessed the password in", guesscount, "tries") + print("You guessed the number in", guesscount, "tries") guesscount = 0 - password = randint(1, 100) + number = randint(1, 100) if dev == 1: - print(password) + print(number) pasw = 1 - elif password > passwordguess: + elif number > numberguess: print("More") guesscount += 1 - elif password < passwordguess: + elif number < numberguess: print("Less") guesscount += 1 - elif password != passwordguess: + elif number != numberguess: print("Wrong!") pasw = 1 @@ -100,25 +100,25 @@ diff = 0 while pasw == 1: if start == 1: - password = randint(1, 1000) + number = randint(1, 1000) print("Hard Mode is between 1 and 1000") start = 0 - passwordguess = int(input("Password:")) - if password == passwordguess: + numberguess = int(input("Number:")) + if number == numberguess: print("Correct!") - print("You guessed the password in", guesscount, "tries") + print("You guessed the number in", guesscount, "tries") guesscount = 0 - password = randint(1, 1000) + number = randint(1, 1000) if dev == 1: - print(password) + print(number) pasw = 1 - elif password > passwordguess: + elif number > numberguess: print("More") guesscount += 1 - elif password < passwordguess: + elif number < numberguess: print("Less") guesscount += 1 - elif password != passwordguess: + elif number != numberguess: print("Wrong!") pasw = 1 @@ -127,25 +127,25 @@ diff = 0 while pasw == 1: if start == 1: - password = randint(1, 10000) + number = randint(1, 10000) print("VeryHard Mode is between 1 and 10000") start = 0 - passwordguess = int(input("Password:")) - if password == passwordguess: + numberguess = int(input("Number:")) + if number == numberguess: print("Correct!") - print("You guessed the password in", guesscount, "tries") + print("You guessed the number in", guesscount, "tries") guesscount = 0 - password = randint(1, 10000) + number = randint(1, 10000) if dev == 1: - print(password) + print(number) pasw = 1 - elif password > passwordguess: + elif number > numberguess: print("More") guesscount += 1 - elif password < passwordguess: + elif number < numberguess: print("Less") guesscount += 1 - elif password != passwordguess: + elif number != numberguess: print("Wrong!") pasw = 1 # Extreme @@ -153,25 +153,25 @@ diff = 0 while pasw == 1: if start == 1: - password = randint(1, 100000) + number = randint(1, 100000) print("Extreme Mode is between 1 and 100000") start = 0 - passwordguess = int(input("Password:")) - if password == passwordguess: + numberguess = int(input("Number:")) + if number == numberguess: print("Correct!") - print("You guessed the password in", guesscount, "tries") + print("You guessed the number in", guesscount, "tries") guesscount = 0 - password = randint(1, 100000) + number = randint(1, 100000) if dev == 1: - print(password) + print(number) pasw = 1 - elif password > passwordguess: + elif number > numberguess: print("More") guesscount += 1 - elif password < passwordguess: + elif number < numberguess: print("Less") guesscount += 1 - elif password != passwordguess: + elif number != numberguess: print("Wrong!") pasw = 1 @@ -180,25 +180,25 @@ diff = 0 while pasw == 1: if start == 1: - password = randint(1, 1000000) + number = randint(1, 1000000) print("Impossible Mode is between 1 and 1000000") start = 0 - passwordguess = int(input("Password:")) - if password == passwordguess: + numberguess = int(input("Number:")) + if number == numberguess: print("Correct!") - print("You guessed the password in", guesscount, "tries") + print("You guessed the number in", guesscount, "tries") guesscount = 0 - password = randint(1, 1000000) + number = randint(1, 1000000) if dev == 1: - print(password) + print(number) pasw = 1 - elif password > passwordguess: + elif number > numberguess: print("More") guesscount += 1 - elif password < passwordguess: + elif number < numberguess: print("Less") guesscount += 1 - elif password != passwordguess: + elif number != numberguess: print("Wrong!") pasw = 1 @@ -207,25 +207,25 @@ diff = 0 while pasw == 1: if start == 1: - password = randint(1, 10000000) + number = randint(1, 10000000) print("Impossible2 Mode is between 1 and 10000000") start = 0 - passwordguess = int(input("Password:")) - if password == passwordguess: + numberguess = int(input("Number:")) + if number == numberguess: print("Correct!") - print("You guessed the password in", guesscount, "tries") + print("You guessed the number in", guesscount, "tries") guesscount = 0 - password = randint(1, 10000000) + number = randint(1, 10000000) if dev == 1: - print(password) + print(number) pasw = 1 - elif password > passwordguess: + elif number > numberguess: print("More") guesscount += 1 - elif password < passwordguess: + elif number < numberguess: print("Less") guesscount += 1 - elif password != passwordguess: + elif number != numberguess: print("Wrong!") pasw = 1 @@ -234,25 +234,25 @@ diff = 0 while pasw == 1: if start == 1: - password = randint(1, 100000000) + number = randint(1, 100000000) print("Impossible3 Mode is between 1 and 100000000") start = 0 - passwordguess = int(input("Password:")) - if password == passwordguess: + numberguess = int(input("Number:")) + if number == numberguess: print("Correct!") - print("You guessed the password in", guesscount, "tries") + print("You guessed the number in", guesscount, "tries") guesscount = 0 - password = randint(1, 100000000) + number = randint(1, 100000000) if dev == 1: - print(password) + print(number) pasw = 1 - elif password > passwordguess: + elif number > numberguess: print("More") guesscount += 1 - elif password < passwordguess: + elif number < numberguess: print("Less") guesscount += 1 - elif password != passwordguess: + elif number != numberguess: print("Wrong!") pasw = 1 @@ -264,28 +264,28 @@ if start == 1: devx = int(input("X: ")) devy = int(input("Y: ")) - password = randint(devx, devy) + number = randint(devx, devy) print("Custom Mode is between", devx, "and", devy) start = 0 - passwordguess = int(input("Password:")) - if password == passwordguess: + numberguess = int(input("Number:")) + if number == numberguess: print("Correct!") - print("You guessed the password in", guesscount, "tries") + print("You guessed the number in", guesscount, "tries") guesscount = 0 devx = int(input("X: ")) devy = int(input("Y: ")) print("Custom Mode is between", devx, "and", devy) - password = randint(devx, devy) + number = randint(devx, devy) if dev == 1: - print(password) + print(number) pasw = 1 - elif password > passwordguess: + elif number > numberguess: print("More") guesscount += 1 - elif password < passwordguess: + elif number < numberguess: print("Less") guesscount += 1 - elif password != passwordguess: + elif number != numberguess: print("Wrong!") pasw = 1 @@ -294,16 +294,16 @@ diff = 0 while pasw == 1: if start == 1: - password = randint(1, 10) + number = randint(1, 10) if dev == 1: - print(password) + print(number) print("Choose a number between 1 and 10") lesson = 1 start = 2 - passwordguess = int(input("Password:")) - if password == passwordguess: + numberguess = int(input("Number:")) + if number == numberguess: print("Correct!") - print("You guessed the password in", guesscount, "tries") + print("You guessed the number in", guesscount, "tries") if lesson == 1: if guesscount <= 5: print("You completed the level!") @@ -313,19 +313,19 @@ print("You failed the level!") print("To complete the level, use less than 5 tries") guesscount = 1 - password = randint(1, 10) + number = randint(1, 10) if dev == 1: - print(password) + print(number) print("Choose a number between 1 and 10") if lesson == 2: if less == 1: - password = randint(1, 100) + number = randint(1, 100) if dev == 1: - print(password) + print(number) print("Choose a number between 1 and 100") less = 0 - if password == passwordguess: + if number == numberguess: if guesscount <= 10: print("You completed the level!") guesscount = 1 @@ -335,19 +335,19 @@ print("You failed the level!") print("To complete the level, use less than 10 tries") guesscount = 1 - password = randint(1, 100) + number = randint(1, 100) if dev == 1: - print(password) + print(number) print("Choose a number between 1 and 100") if lesson == 3: if less == 1: - password = randint(1, 1000) + number = randint(1, 1000) if dev == 1: - print(password) + print(number) print("Choose a number between 1 and 1000") less = 0 - if password == passwordguess: + if number == numberguess: if guesscount <= 20: print("You completed the level!") guesscount = 1 @@ -357,19 +357,19 @@ print("You failed the level!") print("To complete the level, use less than 20 tries") guesscount = 1 - password = randint(1, 1000) + number = randint(1, 1000) if dev == 1: - print(password) + print(number) print("Choose a number between 1 and 1000") if lesson == 4: if less == 1: - password = randint(1, 10000) + number = randint(1, 10000) if dev == 1: - print(password) + print(number) print("Choose a number between 1 and 10000") less = 0 - if password == passwordguess: + if number == numberguess: if guesscount <= 40: print("You completed the level!") guesscount = 1 @@ -379,19 +379,19 @@ print("You failed the level!") print("To complete the level, use less than 40 tries") guesscount = 1 - password = randint(1, 10000) + number = randint(1, 10000) if dev == 1: - print(password) + print(number) print("Choose a number between 1 and 10000") if lesson == 5: if less == 1: - password = randint(1, 100000) + number = randint(1, 100000) if dev == 1: - print(password) + print(number) print("Choose a number between 1 and 100000") less = 0 - if password == passwordguess: + if number == numberguess: if guesscount <= 80: print("You completed the level!") guesscount = 1 @@ -401,19 +401,19 @@ print("You failed the level!") print("To complete the level, use less than 80 tries") guesscount = 1 - password = randint(1, 100000) + number = randint(1, 100000) if dev == 1: - print(password) + print(number) print("Choose a number between 1 and 100000") if lesson == 6: if less == 1: - password = randint(1, 1000000) + number = randint(1, 1000000) if dev == 1: - print(password) + print(number) print("Choose a number between 1 and 1000000") less = 0 - if password == passwordguess: + if number == numberguess: if guesscount <= 160: print("You completed the level!") print("You completed Learn Mode!") @@ -425,22 +425,22 @@ print("You failed the level!") print("To complete the level, use less than 160 tries") guesscount = 1 - password = randint(1, 1000000) + number = randint(1, 1000000) if dev == 1: - print(password) + print(number) print("Choose a number between 1 and 1000000") guesscount = 1 if dev == 1: - print(password) + print(number) pasw = 1 - elif password > passwordguess: + elif number > numberguess: print("More") guesscount += 1 - elif password < passwordguess: + elif number < numberguess: print("Less") guesscount += 1 - elif password != passwordguess: + elif number != numberguess: print("Wrong!") pasw = 1 else: From 8e7810dd46075d1a7ec499dbdcbb4322b759e4dd Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 11:51:49 -0500 Subject: [PATCH 151/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index 0d29a33..c940a44 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -272,9 +272,6 @@ print("Correct!") print("You guessed the number in", guesscount, "tries") guesscount = 0 - devx = int(input("X: ")) - devy = int(input("Y: ")) - print("Custom Mode is between", devx, "and", devy) number = randint(devx, devy) if dev == 1: print(number) From be1bd93fdf49b792a55361bda846920f499513e3 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 12:41:56 -0500 Subject: [PATCH 152/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 120 +++++++++++++++++++++++++++++++++++--- 1 file changed, 111 insertions(+), 9 deletions(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index c940a44..8062c09 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -10,6 +10,8 @@ diff = 1 guesscount = 1 less = 1 +streakcount = 0 +streakguess = 0 # Prints All Numbers (Change to dev = 1 to enable) dev = 0 @@ -48,12 +50,23 @@ if start == 1: number = randint(1, 10) print("Easy Mode is between 1 and 10") + if dev == 1: + print(number) start = 0 numberguess = int(input("Number:")) if number == numberguess: print("Correct!") print("You guessed the number in", guesscount, "tries") - guesscount = 0 + streakcount += 1 + streakguess += guesscount + if streakcount == 3: + if streakguess <= 6: + print("Streak!") + else: + print("No Streak!") + streakguess = 0 + streakcount = 0 + guesscount = 1 number = randint(1, 10) if dev == 1: print(number) @@ -75,12 +88,23 @@ if start == 1: number = randint(1, 100) print("Medium Mode is between 1 and 100") + if dev == 1: + print(number) start = 0 numberguess = int(input("Number:")) if number == numberguess: print("Correct!") print("You guessed the number in", guesscount, "tries") - guesscount = 0 + streakcount += 1 + streakguess += guesscount + if streakcount == 3: + if streakguess <= 24: + print("Streak!") + else: + print("No Streak!") + streakguess = 0 + streakcount = 0 + guesscount = 1 number = randint(1, 100) if dev == 1: print(number) @@ -102,12 +126,23 @@ if start == 1: number = randint(1, 1000) print("Hard Mode is between 1 and 1000") + if dev == 1: + print(number) start = 0 numberguess = int(input("Number:")) if number == numberguess: print("Correct!") print("You guessed the number in", guesscount, "tries") - guesscount = 0 + streakcount += 1 + streakguess += guesscount + if streakcount == 3: + if streakguess <= 48: + print("Streak!") + else: + print("No Streak!") + streakguess = 0 + streakcount = 0 + guesscount = 1 number = randint(1, 1000) if dev == 1: print(number) @@ -129,12 +164,23 @@ if start == 1: number = randint(1, 10000) print("VeryHard Mode is between 1 and 10000") + if dev == 1: + print(number) start = 0 numberguess = int(input("Number:")) if number == numberguess: print("Correct!") print("You guessed the number in", guesscount, "tries") - guesscount = 0 + streakcount += 1 + streakguess += guesscount + if streakcount == 3: + if streakguess <= 96: + print("Streak!") + else: + print("No Streak!") + streakguess = 0 + streakcount = 0 + guesscount = 1 number = randint(1, 10000) if dev == 1: print(number) @@ -155,12 +201,23 @@ if start == 1: number = randint(1, 100000) print("Extreme Mode is between 1 and 100000") + if dev == 1: + print(number) start = 0 numberguess = int(input("Number:")) if number == numberguess: print("Correct!") print("You guessed the number in", guesscount, "tries") - guesscount = 0 + streakcount += 1 + streakguess += guesscount + if streakcount == 3: + if streakguess <= 192: + print("Streak!") + else: + print("No Streak!") + streakguess = 0 + streakcount = 0 + guesscount = 1 number = randint(1, 100000) if dev == 1: print(number) @@ -182,12 +239,23 @@ if start == 1: number = randint(1, 1000000) print("Impossible Mode is between 1 and 1000000") + if dev == 1: + print(number) start = 0 numberguess = int(input("Number:")) if number == numberguess: print("Correct!") print("You guessed the number in", guesscount, "tries") - guesscount = 0 + streakcount += 1 + streakguess += guesscount + if streakcount == 3: + if streakguess <= 384: + print("Streak!") + else: + print("No Streak!") + streakguess = 0 + streakcount = 0 + guesscount = 1 number = randint(1, 1000000) if dev == 1: print(number) @@ -209,12 +277,23 @@ if start == 1: number = randint(1, 10000000) print("Impossible2 Mode is between 1 and 10000000") + if dev == 1: + print(number) start = 0 numberguess = int(input("Number:")) if number == numberguess: print("Correct!") print("You guessed the number in", guesscount, "tries") - guesscount = 0 + streakcount += 1 + streakguess += guesscount + if streakcount == 3: + if streakguess <= 768: + print("Streak!") + else: + print("No Streak!") + streakguess = 0 + streakcount = 0 + guesscount = 1 number = randint(1, 10000000) if dev == 1: print(number) @@ -236,12 +315,23 @@ if start == 1: number = randint(1, 100000000) print("Impossible3 Mode is between 1 and 100000000") + if dev == 1: + print(number) start = 0 numberguess = int(input("Number:")) if number == numberguess: print("Correct!") print("You guessed the number in", guesscount, "tries") - guesscount = 0 + streakcount += 1 + streakguess += guesscount + if streakcount == 3: + if streakguess <= 1536: + print("Streak!") + else: + print("No Streak!") + streakguess = 0 + streakcount = 0 + guesscount = 1 number = randint(1, 100000000) if dev == 1: print(number) @@ -264,14 +354,26 @@ if start == 1: devx = int(input("X: ")) devy = int(input("Y: ")) + streakamount = int(input("Streak: ")) number = randint(devx, devy) print("Custom Mode is between", devx, "and", devy) + if dev == 1: + print(number) start = 0 numberguess = int(input("Number:")) if number == numberguess: print("Correct!") print("You guessed the number in", guesscount, "tries") - guesscount = 0 + streakcount += 1 + streakguess += guesscount + if streakcount == 3: + if streakguess <= streakamount: + print("Streak!") + else: + print("No Streak!") + streakguess = 0 + streakcount = 0 + guesscount = 1 number = randint(devx, devy) if dev == 1: print(number) From b0369bc68235162392cad31206452a7da28e6292 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 12:43:18 -0500 Subject: [PATCH 153/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index 8062c09..b3c2fab 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -60,7 +60,7 @@ streakcount += 1 streakguess += guesscount if streakcount == 3: - if streakguess <= 6: + if streakguess <= 8: print("Streak!") else: print("No Streak!") From 8b13aa675b39bbe4bf64a2a59935306f02a246e9 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 13:01:20 -0500 Subject: [PATCH 154/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index b3c2fab..4a4588f 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -49,7 +49,7 @@ while pasw == 1: if start == 1: number = randint(1, 10) - print("Easy Mode is between 1 and 10") + print("Easy Mode is |between 1 and 10| and |has a streak of 8|") if dev == 1: print(number) start = 0 @@ -87,7 +87,7 @@ while pasw == 1: if start == 1: number = randint(1, 100) - print("Medium Mode is between 1 and 100") + print("Medium Mode is |between 1 and 100| and |has a streak of 24|") if dev == 1: print(number) start = 0 @@ -125,7 +125,7 @@ while pasw == 1: if start == 1: number = randint(1, 1000) - print("Hard Mode is between 1 and 1000") + print("Hard Mode is |between 1 and 1000| and |has a streak of 48|") if dev == 1: print(number) start = 0 @@ -163,7 +163,7 @@ while pasw == 1: if start == 1: number = randint(1, 10000) - print("VeryHard Mode is between 1 and 10000") + print("VeryHard Mode is |between 1 and 10000| and |has a streak of 96|") if dev == 1: print(number) start = 0 @@ -200,7 +200,7 @@ while pasw == 1: if start == 1: number = randint(1, 100000) - print("Extreme Mode is between 1 and 100000") + print("Extreme Mode is |between 1 and 100000| and |has a streak of 192|") if dev == 1: print(number) start = 0 @@ -238,7 +238,7 @@ while pasw == 1: if start == 1: number = randint(1, 1000000) - print("Impossible Mode is between 1 and 1000000") + print("Impossible Mode is |between 1 and 1000000| and |has a streak of 384|") if dev == 1: print(number) start = 0 @@ -276,7 +276,7 @@ while pasw == 1: if start == 1: number = randint(1, 10000000) - print("Impossible2 Mode is between 1 and 10000000") + print("Impossible2 Mode is |between 1 and 10000000| and |has a streak of 768|") if dev == 1: print(number) start = 0 @@ -314,7 +314,7 @@ while pasw == 1: if start == 1: number = randint(1, 100000000) - print("Impossible3 Mode is between 1 and 100000000") + print("Impossible3 Mode is |between 1 and 100000000| and |has a streak of 1536|") if dev == 1: print(number) start = 0 @@ -356,7 +356,7 @@ devy = int(input("Y: ")) streakamount = int(input("Streak: ")) number = randint(devx, devy) - print("Custom Mode is between", devx, "and", devy) + print("Custom Mode is |between ", devx, " and ", devy,"| and |has a streak of ", streakamount,"|", sep='') if dev == 1: print(number) start = 0 From c910fdd073394eeab337ed6daa2ceb297c0799b9 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 13:25:30 -0500 Subject: [PATCH 155/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 95 ++++++++++++++++++++++++++++++++++----- 1 file changed, 85 insertions(+), 10 deletions(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index 4a4588f..3efdcb3 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -12,6 +12,9 @@ less = 1 streakcount = 0 streakguess = 0 +streak1 = 0 +streak2 = 0 +streak3 = 0 # Prints All Numbers (Change to dev = 1 to enable) dev = 0 @@ -49,7 +52,7 @@ while pasw == 1: if start == 1: number = randint(1, 10) - print("Easy Mode is |between 1 and 10| and |has a streak of 8|") + print("Easy Mode is |between 1 and 10| and |has a streak of 3|") if dev == 1: print(number) start = 0 @@ -59,11 +62,19 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streakcount == 1: + streak1 = streakguess + if streakcount == 2: + streak2 = streakguess if streakcount == 3: - if streakguess <= 8: + streak3 = streakguess + if streak1 <= 3 and streak2 <= 3 and streak3 <= 3: print("Streak!") else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 streakguess = 0 streakcount = 0 guesscount = 1 @@ -97,11 +108,19 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streakcount == 1: + streak1 = streakguess + if streakcount == 2: + streak2 = streakguess if streakcount == 3: - if streakguess <= 24: + streak3 = streakguess + if streak1 <= 8 and streak2 <= 8 and streak3 <= 8: print("Streak!") else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 streakguess = 0 streakcount = 0 guesscount = 1 @@ -135,11 +154,19 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streakcount == 1: + streak1 = streakguess + if streakcount == 2: + streak2 = streakguess if streakcount == 3: - if streakguess <= 48: + streak3 = streakguess + if streak1 <= 16 and streak2 <= 16 and streak3 <= 16: print("Streak!") else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 streakguess = 0 streakcount = 0 guesscount = 1 @@ -173,11 +200,19 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streakcount == 1: + streak1 = streakguess + if streakcount == 2: + streak2 = streakguess if streakcount == 3: - if streakguess <= 96: + streak3 = streakguess + if streak1 <= 32 and streak2 <= 32 and streak3 <= 32: print("Streak!") else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 streakguess = 0 streakcount = 0 guesscount = 1 @@ -210,11 +245,19 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streakcount == 1: + streak1 = streakguess + if streakcount == 2: + streak2 = streakguess if streakcount == 3: - if streakguess <= 192: + streak3 = streakguess + if streak1 <= 64 and streak2 <= 64 and streak3 <= 64: print("Streak!") else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 streakguess = 0 streakcount = 0 guesscount = 1 @@ -248,11 +291,19 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streakcount == 1: + streak1 = streakguess + if streakcount == 2: + streak2 = streakguess if streakcount == 3: - if streakguess <= 384: + streak3 = streakguess + if streak1 <= 128 and streak2 <= 128 and streak3 <= 128: print("Streak!") else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 streakguess = 0 streakcount = 0 guesscount = 1 @@ -286,11 +337,19 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streakcount == 1: + streak1 = streakguess + if streakcount == 2: + streak2 = streakguess if streakcount == 3: - if streakguess <= 768: + streak3 = streakguess + if streak1 <= 256 and streak2 <= 256 and streak3 <= 256: print("Streak!") else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 streakguess = 0 streakcount = 0 guesscount = 1 @@ -324,11 +383,19 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streakcount == 1: + streak1 = streakguess + if streakcount == 2: + streak2 = streakguess if streakcount == 3: - if streakguess <= 1536: + streak3 = streakguess + if streak1 <= 512 and streak2 <= 512 and streak3 <= 512: print("Streak!") else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 streakguess = 0 streakcount = 0 guesscount = 1 @@ -366,11 +433,19 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streakcount == 1: + streak1 = streakguess + if streakcount == 2: + streak2 = streakguess if streakcount == 3: - if streakguess <= streakamount: + streak3 = streakguess + if streak1 <= streakamount and streak2 <= streakamount and streak3 <= streakamount: print("Streak!") else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 streakguess = 0 streakcount = 0 guesscount = 1 From 36c79f7ad74e3674a0b82e577d645621f4da1939 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 13:28:55 -0500 Subject: [PATCH 156/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index 3efdcb3..9bea3ac 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -28,7 +28,7 @@ text = "Created by Nathan R (Mosrod)" for character in text: sys.stdout.write(character) - sleep(0.2) + sleep(0.15) print("\n") text = "|Easy|Medium|Hard|VeryHard|Extreme|Impossible|Impossible2|Impossible3|Custom|Learn|" for character in text: @@ -98,7 +98,7 @@ while pasw == 1: if start == 1: number = randint(1, 100) - print("Medium Mode is |between 1 and 100| and |has a streak of 24|") + print("Medium Mode is |between 1 and 100| and |has a streak of 8|") if dev == 1: print(number) start = 0 @@ -144,7 +144,7 @@ while pasw == 1: if start == 1: number = randint(1, 1000) - print("Hard Mode is |between 1 and 1000| and |has a streak of 48|") + print("Hard Mode is |between 1 and 1000| and |has a streak of 16|") if dev == 1: print(number) start = 0 @@ -190,7 +190,7 @@ while pasw == 1: if start == 1: number = randint(1, 10000) - print("VeryHard Mode is |between 1 and 10000| and |has a streak of 96|") + print("VeryHard Mode is |between 1 and 10000| and |has a streak of 32|") if dev == 1: print(number) start = 0 @@ -235,7 +235,7 @@ while pasw == 1: if start == 1: number = randint(1, 100000) - print("Extreme Mode is |between 1 and 100000| and |has a streak of 192|") + print("Extreme Mode is |between 1 and 100000| and |has a streak of 64|") if dev == 1: print(number) start = 0 @@ -281,7 +281,7 @@ while pasw == 1: if start == 1: number = randint(1, 1000000) - print("Impossible Mode is |between 1 and 1000000| and |has a streak of 384|") + print("Impossible Mode is |between 1 and 1000000| and |has a streak of 128|") if dev == 1: print(number) start = 0 @@ -327,7 +327,7 @@ while pasw == 1: if start == 1: number = randint(1, 10000000) - print("Impossible2 Mode is |between 1 and 10000000| and |has a streak of 768|") + print("Impossible2 Mode is |between 1 and 10000000| and |has a streak of 256|") if dev == 1: print(number) start = 0 @@ -373,7 +373,7 @@ while pasw == 1: if start == 1: number = randint(1, 100000000) - print("Impossible3 Mode is |between 1 and 100000000| and |has a streak of 1536|") + print("Impossible3 Mode is |between 1 and 100000000| and |has a streak of 512|") if dev == 1: print(number) start = 0 From 5cac6bd10d9e28fd4f0a1acd95bfe93e04ec491a Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 13:39:09 -0500 Subject: [PATCH 157/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 56 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index 9bea3ac..1838f35 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -16,7 +16,7 @@ streak2 = 0 streak3 = 0 # Prints All Numbers (Change to dev = 1 to enable) -dev = 0 +dev = 1 # Code if start == 1: @@ -63,11 +63,11 @@ streakcount += 1 streakguess += guesscount if streakcount == 1: - streak1 = streakguess + streak1 = guesscount if streakcount == 2: - streak2 = streakguess + streak2 = guesscount if streakcount == 3: - streak3 = streakguess + streak3 = guesscount if streak1 <= 3 and streak2 <= 3 and streak3 <= 3: print("Streak!") else: @@ -109,11 +109,11 @@ streakcount += 1 streakguess += guesscount if streakcount == 1: - streak1 = streakguess + streak1 = guesscount if streakcount == 2: - streak2 = streakguess + streak2 = guesscount if streakcount == 3: - streak3 = streakguess + streak3 = guesscount if streak1 <= 8 and streak2 <= 8 and streak3 <= 8: print("Streak!") else: @@ -155,11 +155,11 @@ streakcount += 1 streakguess += guesscount if streakcount == 1: - streak1 = streakguess + streak1 = guesscount if streakcount == 2: - streak2 = streakguess + streak2 = guesscount if streakcount == 3: - streak3 = streakguess + streak3 = guesscount if streak1 <= 16 and streak2 <= 16 and streak3 <= 16: print("Streak!") else: @@ -201,11 +201,11 @@ streakcount += 1 streakguess += guesscount if streakcount == 1: - streak1 = streakguess + streak1 = guesscount if streakcount == 2: - streak2 = streakguess + streak2 = guesscount if streakcount == 3: - streak3 = streakguess + streak3 = guesscount if streak1 <= 32 and streak2 <= 32 and streak3 <= 32: print("Streak!") else: @@ -246,11 +246,11 @@ streakcount += 1 streakguess += guesscount if streakcount == 1: - streak1 = streakguess + streak1 = guesscount if streakcount == 2: - streak2 = streakguess + streak2 = guesscount if streakcount == 3: - streak3 = streakguess + streak3 = guesscount if streak1 <= 64 and streak2 <= 64 and streak3 <= 64: print("Streak!") else: @@ -292,11 +292,11 @@ streakcount += 1 streakguess += guesscount if streakcount == 1: - streak1 = streakguess + streak1 = guesscount if streakcount == 2: - streak2 = streakguess + streak2 = guesscount if streakcount == 3: - streak3 = streakguess + streak3 = guesscount if streak1 <= 128 and streak2 <= 128 and streak3 <= 128: print("Streak!") else: @@ -338,11 +338,11 @@ streakcount += 1 streakguess += guesscount if streakcount == 1: - streak1 = streakguess + streak1 = guesscount if streakcount == 2: - streak2 = streakguess + streak2 = guesscount if streakcount == 3: - streak3 = streakguess + streak3 = guesscount if streak1 <= 256 and streak2 <= 256 and streak3 <= 256: print("Streak!") else: @@ -384,11 +384,11 @@ streakcount += 1 streakguess += guesscount if streakcount == 1: - streak1 = streakguess + streak1 = guesscount if streakcount == 2: - streak2 = streakguess + streak2 = guesscount if streakcount == 3: - streak3 = streakguess + streak3 = guesscount if streak1 <= 512 and streak2 <= 512 and streak3 <= 512: print("Streak!") else: @@ -434,11 +434,11 @@ streakcount += 1 streakguess += guesscount if streakcount == 1: - streak1 = streakguess + streak1 = guesscount if streakcount == 2: - streak2 = streakguess + streak2 = guesscount if streakcount == 3: - streak3 = streakguess + streak3 = guesscount if streak1 <= streakamount and streak2 <= streakamount and streak3 <= streakamount: print("Streak!") else: From e79cf7298268cd939b8eddebfe2c3a5cbb013c4a Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 13:39:54 -0500 Subject: [PATCH 158/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index 1838f35..8892565 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -16,7 +16,7 @@ streak2 = 0 streak3 = 0 # Prints All Numbers (Change to dev = 1 to enable) -dev = 1 +dev = 0 # Code if start == 1: From 244c39618d2832a25019b3508475321aec9e6127 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 15:43:32 -0500 Subject: [PATCH 159/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index 8892565..d6dee3f 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -16,7 +16,7 @@ streak2 = 0 streak3 = 0 # Prints All Numbers (Change to dev = 1 to enable) -dev = 0 +dev = 1 # Code if start == 1: @@ -62,6 +62,8 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streak1 > 3 or streak2 > 3 or streak3 > 3: + streakcount = 1 if streakcount == 1: streak1 = guesscount if streakcount == 2: @@ -108,6 +110,8 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streak1 > 8 or streak2 > 8 or streak3 > 8: + streakcount = 1 if streakcount == 1: streak1 = guesscount if streakcount == 2: @@ -154,6 +158,8 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streak1 > 16 or streak2 > 16 or streak3 > 16: + streakcount = 1 if streakcount == 1: streak1 = guesscount if streakcount == 2: @@ -200,6 +206,8 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streak1 > 32 or streak2 > 32 or streak3 > 32: + streakcount = 1 if streakcount == 1: streak1 = guesscount if streakcount == 2: @@ -245,6 +253,8 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streak1 > 64 or streak2 > 64 or streak3 > 64: + streakcount = 1 if streakcount == 1: streak1 = guesscount if streakcount == 2: @@ -291,6 +301,8 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streak1 > 128 or streak2 > 128 or streak3 > 128: + streakcount = 1 if streakcount == 1: streak1 = guesscount if streakcount == 2: @@ -337,6 +349,8 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streak1 > 256 or streak2 > 256 or streak3 > 256: + streakcount = 1 if streakcount == 1: streak1 = guesscount if streakcount == 2: @@ -383,6 +397,8 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streak1 > 512 or streak2 > 512 or streak3 > 512: + streakcount = 1 if streakcount == 1: streak1 = guesscount if streakcount == 2: @@ -433,6 +449,8 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount + if streak1 > streakamount or streak2 > streakamount or streak3 > streakamount: + streakcount = 1 if streakcount == 1: streak1 = guesscount if streakcount == 2: From 374e8a4df714d12edbf3f3bf297e0df753a3cdcf Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 15:46:06 -0500 Subject: [PATCH 160/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index d6dee3f..03a24b1 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -16,7 +16,7 @@ streak2 = 0 streak3 = 0 # Prints All Numbers (Change to dev = 1 to enable) -dev = 1 +dev = 0 # Code if start == 1: From 548a9f30c64573318bda62c150415e293cb8d236 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 20:42:20 -0500 Subject: [PATCH 161/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index 03a24b1..63dff84 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -23,17 +23,17 @@ text = "Welcome to Number Guesser" for character in text: sys.stdout.write(character) - sleep(0.2) + sleep(0.15) print("\n") text = "Created by Nathan R (Mosrod)" for character in text: sys.stdout.write(character) - sleep(0.15) + sleep(0.1) print("\n") text = "|Easy|Medium|Hard|VeryHard|Extreme|Impossible|Impossible2|Impossible3|Custom|Learn|" for character in text: sys.stdout.write(character) - sleep(0.05) + sleep(0.03) print("\n") if dev == 1: text = "You are a developer!" @@ -148,7 +148,7 @@ while pasw == 1: if start == 1: number = randint(1, 1000) - print("Hard Mode is |between 1 and 1000| and |has a streak of 16|") + print("Hard Mode is |between 1 and 1000| and |has a streak of 12|") if dev == 1: print(number) start = 0 @@ -158,7 +158,7 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount - if streak1 > 16 or streak2 > 16 or streak3 > 16: + if streak1 > 12 or streak2 > 12 or streak3 > 12: streakcount = 1 if streakcount == 1: streak1 = guesscount @@ -166,7 +166,7 @@ streak2 = guesscount if streakcount == 3: streak3 = guesscount - if streak1 <= 16 and streak2 <= 16 and streak3 <= 16: + if streak1 <= 12 and streak2 <= 12 and streak3 <= 12: print("Streak!") else: print("No Streak!") From 3f06276d2f3f9415cb9748dfd2ce5b1bca814de6 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 20:47:02 -0500 Subject: [PATCH 162/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index 63dff84..d57de55 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -196,7 +196,7 @@ while pasw == 1: if start == 1: number = randint(1, 10000) - print("VeryHard Mode is |between 1 and 10000| and |has a streak of 32|") + print("VeryHard Mode is |between 1 and 10000| and |has a streak of 16|") if dev == 1: print(number) start = 0 @@ -206,7 +206,7 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount - if streak1 > 32 or streak2 > 32 or streak3 > 32: + if streak1 > 16 or streak2 > 16 or streak3 > 16: streakcount = 1 if streakcount == 1: streak1 = guesscount @@ -214,7 +214,7 @@ streak2 = guesscount if streakcount == 3: streak3 = guesscount - if streak1 <= 32 and streak2 <= 32 and streak3 <= 32: + if streak1 <= 16 and streak2 <= 16 and streak3 <= 16: print("Streak!") else: print("No Streak!") From 13091fce1a8700d5b19235c1bec0e14496c3e7bd Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 11 Nov 2017 21:23:03 -0500 Subject: [PATCH 163/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index d57de55..b565e48 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -243,7 +243,7 @@ while pasw == 1: if start == 1: number = randint(1, 100000) - print("Extreme Mode is |between 1 and 100000| and |has a streak of 64|") + print("Extreme Mode is |between 1 and 100000| and |has a streak of 20|") if dev == 1: print(number) start = 0 @@ -253,7 +253,7 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount - if streak1 > 64 or streak2 > 64 or streak3 > 64: + if streak1 > 20 or streak2 > 20 or streak3 > 20: streakcount = 1 if streakcount == 1: streak1 = guesscount @@ -261,7 +261,7 @@ streak2 = guesscount if streakcount == 3: streak3 = guesscount - if streak1 <= 64 and streak2 <= 64 and streak3 <= 64: + if streak1 <= 20 and streak2 <= 20 and streak3 <= 20: print("Streak!") else: print("No Streak!") @@ -291,7 +291,7 @@ while pasw == 1: if start == 1: number = randint(1, 1000000) - print("Impossible Mode is |between 1 and 1000000| and |has a streak of 128|") + print("Impossible Mode is |between 1 and 1000000| and |has a streak of 24|") if dev == 1: print(number) start = 0 @@ -301,7 +301,7 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount - if streak1 > 128 or streak2 > 128 or streak3 > 128: + if streak1 > 24 or streak2 > 24 or streak3 > 24: streakcount = 1 if streakcount == 1: streak1 = guesscount @@ -309,7 +309,7 @@ streak2 = guesscount if streakcount == 3: streak3 = guesscount - if streak1 <= 128 and streak2 <= 128 and streak3 <= 128: + if streak1 <= 24 and streak2 <= 24 and streak3 <= 24: print("Streak!") else: print("No Streak!") @@ -339,7 +339,7 @@ while pasw == 1: if start == 1: number = randint(1, 10000000) - print("Impossible2 Mode is |between 1 and 10000000| and |has a streak of 256|") + print("Impossible2 Mode is |between 1 and 10000000| and |has a streak of 28|") if dev == 1: print(number) start = 0 @@ -349,7 +349,7 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount - if streak1 > 256 or streak2 > 256 or streak3 > 256: + if streak1 > 28 or streak2 > 28 or streak3 > 28: streakcount = 1 if streakcount == 1: streak1 = guesscount @@ -357,7 +357,7 @@ streak2 = guesscount if streakcount == 3: streak3 = guesscount - if streak1 <= 256 and streak2 <= 256 and streak3 <= 256: + if streak1 <= 28 and streak2 <= 28 and streak3 <= 28: print("Streak!") else: print("No Streak!") From 8a6a303bc1cce02ab7f6b2fa40757f10c6e3b29e Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 12 Nov 2017 07:59:20 -0500 Subject: [PATCH 164/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index b565e48..8686f39 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -387,7 +387,7 @@ while pasw == 1: if start == 1: number = randint(1, 100000000) - print("Impossible3 Mode is |between 1 and 100000000| and |has a streak of 512|") + print("Impossible3 Mode is |between 1 and 100000000| and |has a streak of 34|") if dev == 1: print(number) start = 0 @@ -397,7 +397,7 @@ print("You guessed the number in", guesscount, "tries") streakcount += 1 streakguess += guesscount - if streak1 > 512 or streak2 > 512 or streak3 > 512: + if streak1 > 34 or streak2 > 34 or streak3 > 34: streakcount = 1 if streakcount == 1: streak1 = guesscount @@ -405,7 +405,7 @@ streak2 = guesscount if streakcount == 3: streak3 = guesscount - if streak1 <= 512 and streak2 <= 512 and streak3 <= 512: + if streak1 <= 34 and streak2 <= 34 and streak3 <= 34: print("Streak!") else: print("No Streak!") From eaba0376f1300baceb59a31c63cccd7639ff2f2e Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 12 Nov 2017 12:00:43 -0500 Subject: [PATCH 165/206] Create LetterGen --- Projects/LetterGen | 392 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 392 insertions(+) create mode 100644 Projects/LetterGen diff --git a/Projects/LetterGen b/Projects/LetterGen new file mode 100644 index 0000000..66ba22a --- /dev/null +++ b/Projects/LetterGen @@ -0,0 +1,392 @@ +run = 1 + +while run == 1: + password = int(input("Password: ")) + print(password) + length = len(str(password)) + print(length) + if length >= 1: + dig1 = int(str(password)[:1]) + print(dig1) + if length >= 2: + dig2_ = int(str(password)[:2]) + dig2 = int(str(dig2_)[-1]) + print(dig2) + if length >= 3: + dig3_ = int(str(password)[:3]) + dig3 = int(str(dig3_)[-1]) + print(dig3) + if length >= 4: + dig4_ = int(str(password)[:4]) + dig4 = int(str(dig4_)[-1]) + print(dig4) + if length >= 5: + dig5_ = int(str(password)[:5]) + dig5 = int(str(dig5_)[-1]) + print(dig5) + if length >= 6: + dig6_ = int(str(password)[:6]) + dig6 = int(str(dig6_)[-1]) + print(dig6) + if length >= 7: + dig7_ = int(str(password)[:7]) + dig7 = int(str(dig7_)[-1]) + print(dig7) + if length >= 8: + dig8_ = int(str(password)[:8]) + dig8 = int(str(dig8_)[-1]) + print(dig8) + if length >= 9: + dig9_ = int(str(password)[:9]) + dig9 = int(str(dig9_)[-1]) + print(dig9) + + # Dig 1 + + if dig1 == 1: + dig1 = "A" + print("A") + + elif dig1 == 2: + dig1 = "B" + print("B") + + elif dig1 == 3: + dig1 = "C" + print("C") + + elif dig1 == 4: + dig1 = "D" + print("D") + + elif dig1 == 5: + dig1 = "E" + print("E") + + elif dig1 == 6: + dig1 = "F" + print("F") + + elif dig1 == 7: + dig1 = "G" + print("G") + + elif dig1 == 8: + dig1 = "H" + print("H") + + elif dig1 == 9: + dig1 = "I" + print("I") + + # Dig 2 + + if length >= 1: + if dig2 == 1: + dig2 = "J" + print("J") + + elif dig2 == 2: + dig2 = "K" + print("K") + + elif dig2 == 3: + dig2 = "L" + print("L") + + elif dig2 == 4: + dig2 = "M" + print("M") + + elif dig2 == 5: + dig2 = "N" + print("N") + + elif dig2 == 6: + dig2 = "O" + print("O") + + elif dig2 == 7: + dig2 = "P" + print("P") + + elif dig2 == 8: + dig2 = "Q" + print("Q") + + elif dig2 == 9: + dig2 = "R" + print("R") + + # Dig 3 + + if length >= 3: + if dig3 == 1: + dig3 = "S" + print("S") + + elif dig3 == 2: + dig3 = "T" + print("T") + + elif dig3 == 3: + dig3 = "U" + print("U") + + elif dig3 == 4: + dig3 = "V" + print("V") + + elif dig3 == 5: + dig3 = "W" + print("W") + + elif dig3 == 6: + dig3 = "Y" + print("Y") + + elif dig3 == 7: + dig3 = "X" + print("X") + + elif dig3 == 8: + dig3 = "Z" + print("Z") + + elif dig3 == 9: + dig3 = "A" + print("A") + + # Dig 4 + + if length >= 4: + if dig4 == 1: + dig4 = "B" + print("B") + + elif dig4 == 2: + dig4 = "D" + print("C") + + elif dig4 == 3: + dig4 = "D" + print("D") + + elif dig4 == 4: + dig4 = "E" + print("E") + + elif dig4 == 5: + dig4 = "F" + print("F") + + elif dig4 == 6: + dig4 = "G" + print("G") + + elif dig4 == 7: + dig4 = "H" + print("H") + + elif dig4 == 8: + dig4 = "I" + print("I") + + elif dig4 == 9: + dig4 = "J" + print("J") + + # Dig 5 + + if length >= 5: + if dig5 == 1: + dig5 = "K" + print("K") + + elif dig5 == 2: + dig5 = "L" + print("L") + + elif dig5 == 3: + dig5 = "M" + print("M") + + elif dig5 == 4: + dig5 = "N" + print("N") + + elif dig5 == 5: + dig5 = "O" + print("O") + + elif dig5 == 6: + dig5 = "P" + print("P") + + elif dig5 == 7: + dig5 = "Q" + print("Q") + + elif dig5 == 8: + dig5 = "R" + print("R") + + elif dig5 == 9: + dig5 = "S" + print("S") + + # Dig 6 + + if length >= 6: + if dig6 == 1: + dig6 = "T" + print("T") + + elif dig6 == 2: + dig6 = "U" + print("U") + + elif dig6 == 3: + dig6 = "V" + print("V") + + elif dig6 == 4: + dig6 = "W" + print("W") + + elif dig6 == 5: + dig6 = "Y" + print("Y") + + elif dig6 == 6: + dig6 = "X" + print("X") + + elif dig6 == 7: + dig6 = "Z" + print("Z") + + elif dig6 == 8: + dig6 = "A" + print("A") + + elif dig6 == 9: + dig6 = "B" + print("B") + + # Dig 7 + + if length >= 7: + if dig7 == 1: + dig7 = "C" + print("C") + + elif dig7 == 2: + dig7 = "D" + print("D") + + elif dig7 == 3: + dig7 = "E" + print("E") + + elif dig7 == 4: + dig7 = "F" + print("F") + + elif dig7 == 5: + dig7 = "G" + print("G") + + elif dig7 == 6: + dig7 = "H" + print("H") + + elif dig7 == 7: + dig7 = "I" + print("I") + + elif dig7 == 8: + dig7 = "J" + print("J") + + elif dig7 == 9: + dig7 = "K" + print("K") + + # Dig 8 + + if length >= 8: + if dig8 == 1: + dig8 = "L" + print("L") + + elif dig8 == 2: + dig8 = "M" + print("M") + + elif dig8 == 3: + dig8 = "N" + print("N") + + elif dig8 == 4: + dig8 = "O" + print("O") + + elif dig8 == 5: + dig8 = "P" + print("P") + + elif dig8 == 6: + dig8 = "Q" + print("Q") + + elif dig8 == 7: + dig8 = "R" + print("R") + + elif dig8 == 8: + dig8 = "S" + print("S") + + elif dig8 == 9: + dig8 = "T" + print("T") + + # Dig 9 + + if length >= 5: + if dig9 == 1: + dig9 = "U" + print("U") + + elif dig9 == 2: + dig9 = "V" + print("V") + + elif dig9 == 3: + dig9 = "W" + print("W") + + elif dig9 == 4: + dig9 = "Y" + print("Y") + + elif dig9 == 5: + dig9 = "X" + print("X") + + elif dig9 == 6: + dig9 = "Z" + print("Z") + + elif dig9 == 7: + dig9 = "A" + print("A") + + elif dig9 == 8: + dig9 = "B" + print("B") + + elif dig9 == 9: + dig9 = "C" + print("C") From e2e77aacecf312879d451f6be615141726f3ae5e Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 12 Nov 2017 12:01:11 -0500 Subject: [PATCH 166/206] Rename LetterGen to LetterGen.py --- Projects/{LetterGen => LetterGen.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Projects/{LetterGen => LetterGen.py} (100%) diff --git a/Projects/LetterGen b/Projects/LetterGen.py similarity index 100% rename from Projects/LetterGen rename to Projects/LetterGen.py From cfec1939a3d30921143246034ba366deabe4b42c Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 12 Nov 2017 12:09:40 -0500 Subject: [PATCH 167/206] Update LetterGen.py --- Projects/LetterGen.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Projects/LetterGen.py b/Projects/LetterGen.py index 66ba22a..977c51d 100644 --- a/Projects/LetterGen.py +++ b/Projects/LetterGen.py @@ -390,3 +390,31 @@ elif dig9 == 9: dig9 = "C" print("C") + + + if length = 1: + print(dig1, sep='') + + elif length = 2: + print(dig1,dig2, sep='') + + elif length = 3: + print(dig1,dig2,dig3, sep='') + + elif length = 4: + print(dig1,dig2,dig3,dig4, sep='') + + elif length = 5: + print(dig1,dig2,dig3,dig4,dig5, sep='') + + elif length = 6: + print(dig1,dig2,dig3,dig4,dig5,dig6, sep='') + + elif length = 7: + rint(dig1,dig2,dig3,dig4,dig5,dig6,dig7, sep='') + + elif length = 8: + rint(dig1,dig2,dig3,dig4,dig5,dig6,dig7,dig8, sep='') + + elif length == 9: + print(dig1,dig2,dig3,dig4,dig5,dig6,dig7,dig8,dig9, sep='') From 734ef5b1b56cfbe20f54e9ec86e503cfffb31d16 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 12 Nov 2017 12:10:28 -0500 Subject: [PATCH 168/206] Update LetterGen.py --- Projects/LetterGen.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Projects/LetterGen.py b/Projects/LetterGen.py index 977c51d..271232a 100644 --- a/Projects/LetterGen.py +++ b/Projects/LetterGen.py @@ -392,28 +392,28 @@ print("C") - if length = 1: + if length == 1: print(dig1, sep='') - elif length = 2: + elif length == 2: print(dig1,dig2, sep='') - elif length = 3: + elif length == 3: print(dig1,dig2,dig3, sep='') - elif length = 4: + elif length == 4: print(dig1,dig2,dig3,dig4, sep='') - elif length = 5: + elif length == 5: print(dig1,dig2,dig3,dig4,dig5, sep='') - elif length = 6: + elif length == 6: print(dig1,dig2,dig3,dig4,dig5,dig6, sep='') - elif length = 7: + elif length == 7: rint(dig1,dig2,dig3,dig4,dig5,dig6,dig7, sep='') - elif length = 8: + elif length == 8: rint(dig1,dig2,dig3,dig4,dig5,dig6,dig7,dig8, sep='') elif length == 9: From ae7930ac8635cdce24172d1e542ea93f0ec1aed4 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 12 Nov 2017 12:11:07 -0500 Subject: [PATCH 169/206] Update LetterGen.py --- Projects/LetterGen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projects/LetterGen.py b/Projects/LetterGen.py index 271232a..8a2ab7c 100644 --- a/Projects/LetterGen.py +++ b/Projects/LetterGen.py @@ -411,10 +411,10 @@ print(dig1,dig2,dig3,dig4,dig5,dig6, sep='') elif length == 7: - rint(dig1,dig2,dig3,dig4,dig5,dig6,dig7, sep='') + print(dig1,dig2,dig3,dig4,dig5,dig6,dig7, sep='') elif length == 8: - rint(dig1,dig2,dig3,dig4,dig5,dig6,dig7,dig8, sep='') + print(dig1,dig2,dig3,dig4,dig5,dig6,dig7,dig8, sep='') elif length == 9: print(dig1,dig2,dig3,dig4,dig5,dig6,dig7,dig8,dig9, sep='') From d8b88898b6c30c1066f29e0e5f8b74fe7144e913 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 12 Nov 2017 12:12:46 -0500 Subject: [PATCH 170/206] Update LetterGen.py --- Projects/LetterGen.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Projects/LetterGen.py b/Projects/LetterGen.py index 8a2ab7c..56a98f9 100644 --- a/Projects/LetterGen.py +++ b/Projects/LetterGen.py @@ -1,4 +1,13 @@ run = 1 +dig1 = 0 +dig2 = 0 +dig3 = 0 +dig4 = 0 +dig5 = 0 +dig6 = 0 +dig7 = 0 +dig8 = 0 +dig9 = 0 while run == 1: password = int(input("Password: ")) From 48db1a5e5b2c150cb220d5efcdf3259e32a9e17e Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sun, 12 Nov 2017 12:15:42 -0500 Subject: [PATCH 171/206] Update LetterGen.py --- Projects/LetterGen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projects/LetterGen.py b/Projects/LetterGen.py index 56a98f9..cd73b49 100644 --- a/Projects/LetterGen.py +++ b/Projects/LetterGen.py @@ -401,7 +401,7 @@ print("C") - if length == 1: + if length <= 1: print(dig1, sep='') elif length == 2: @@ -425,5 +425,5 @@ elif length == 8: print(dig1,dig2,dig3,dig4,dig5,dig6,dig7,dig8, sep='') - elif length == 9: + elif length >= 9: print(dig1,dig2,dig3,dig4,dig5,dig6,dig7,dig8,dig9, sep='') From bf52a18c73897001c677ac1c68648d9f22711631 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 13 Nov 2017 20:59:35 -0500 Subject: [PATCH 172/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index 8686f39..976f895 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -23,17 +23,17 @@ text = "Welcome to Number Guesser" for character in text: sys.stdout.write(character) - sleep(0.15) + sleep(0.1) print("\n") text = "Created by Nathan R (Mosrod)" for character in text: sys.stdout.write(character) - sleep(0.1) + sleep(0.05) print("\n") text = "|Easy|Medium|Hard|VeryHard|Extreme|Impossible|Impossible2|Impossible3|Custom|Learn|" for character in text: sys.stdout.write(character) - sleep(0.03) + sleep(0.02) print("\n") if dev == 1: text = "You are a developer!" From 768ba149b7cbd3bb91f0706d341812bf83811c02 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 13 Nov 2017 21:15:38 -0500 Subject: [PATCH 173/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index 976f895..fbee6c4 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -1,3 +1,6 @@ +# Number Guesser +# Created by Nathan R (Mosrod) https://github.com/Mosrod + # Imports from random import * from time import sleep From b4ea86277b66d6a688df83f474c7f1afe1ca7692 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 13 Nov 2017 21:20:05 -0500 Subject: [PATCH 174/206] Update gradeconverter.py --- Projects/gradeconverter.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/Projects/gradeconverter.py b/Projects/gradeconverter.py index d55dc78..c7151e1 100644 --- a/Projects/gradeconverter.py +++ b/Projects/gradeconverter.py @@ -1,8 +1,17 @@ # Grade Converter -# http://cs.smith.edu/~jorourke/Grading.html +# Created by Nathan R (Mosrod) https://github.com/Mosrod +# Grading based on http://cs.smith.edu/~jorourke/Grading.html -# Checker +# Imports +from time import sleep +import sys + +# Variables +ask = 1 + +# Definitions +# Checker def checker(): if Score >= 97.5: @@ -44,9 +53,17 @@ def checker(): elif Score < 60.0: print("F") -# End Of Checker - -ask = 1 +# Code +text = "Welcome to Grade Converter" +for character in text: + sys.stdout.write(character) + sleep(0.1) +print("\n") +text = "Created by Nathan R (Mosrod)" +for character in text: + sys.stdout.write(character) + sleep(0.05) +print("\n") while ask == 1: Choice = input("Fraction/Percent [F/P]:") From ab4a6f3b2c26d8ded39f46b013b636b832e18901 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 13 Nov 2017 21:22:37 -0500 Subject: [PATCH 175/206] Update gradeconverter.py --- Projects/gradeconverter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projects/gradeconverter.py b/Projects/gradeconverter.py index c7151e1..d0693a5 100644 --- a/Projects/gradeconverter.py +++ b/Projects/gradeconverter.py @@ -57,12 +57,12 @@ def checker(): text = "Welcome to Grade Converter" for character in text: sys.stdout.write(character) - sleep(0.1) + sleep(0.05) print("\n") text = "Created by Nathan R (Mosrod)" for character in text: sys.stdout.write(character) - sleep(0.05) + sleep(0.03) print("\n") while ask == 1: From ad189663f31225209a492f0ba4549d04fc2dfec2 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 13 Nov 2017 21:22:48 -0500 Subject: [PATCH 176/206] Rename gradeconverter.py to GradeConverter.py --- Projects/{gradeconverter.py => GradeConverter.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Projects/{gradeconverter.py => GradeConverter.py} (100%) diff --git a/Projects/gradeconverter.py b/Projects/GradeConverter.py similarity index 100% rename from Projects/gradeconverter.py rename to Projects/GradeConverter.py From 8bb46f30805f75b407d017692f8d1f9467189135 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 13 Nov 2017 21:25:30 -0500 Subject: [PATCH 177/206] Update GradeConverter.py --- Projects/GradeConverter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projects/GradeConverter.py b/Projects/GradeConverter.py index d0693a5..c7151e1 100644 --- a/Projects/GradeConverter.py +++ b/Projects/GradeConverter.py @@ -57,12 +57,12 @@ def checker(): text = "Welcome to Grade Converter" for character in text: sys.stdout.write(character) - sleep(0.05) + sleep(0.1) print("\n") text = "Created by Nathan R (Mosrod)" for character in text: sys.stdout.write(character) - sleep(0.03) + sleep(0.05) print("\n") while ask == 1: From 322d13f03b6cdfc0b0bcd540dda07e960401a2d8 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 13 Nov 2017 21:29:24 -0500 Subject: [PATCH 178/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 1138 +++++++++++++++++++------------------ 1 file changed, 570 insertions(+), 568 deletions(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index fbee6c4..31ed498 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -45,598 +45,600 @@ sleep(0.05) print("\n") # |Easy(1-10)|Medium(1-100)|Hard(1-100)|VeryHard(1-1000)|Extreme(1-10000)|Impossible(1-100000)|Impossible2(1-1000000)|Impossible3(1-100000000)Custom|Learn| + while diff == 1: choice = input("|E|M|H|VH|EX|I|I2|I3|C|L|:") diff = 0 -# Easy -if choice == "E": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 10) - print("Easy Mode is |between 1 and 10| and |has a streak of 3|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 3 or streak2 > 3 or streak3 > 3: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 3 and streak2 <= 3 and streak3 <= 3: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 10) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - -# Medium -if choice == "M": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 100) - print("Medium Mode is |between 1 and 100| and |has a streak of 8|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 8 or streak2 > 8 or streak3 > 8: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 8 and streak2 <= 8 and streak3 <= 8: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 100) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - -# Hard -if choice == "H": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 1000) - print("Hard Mode is |between 1 and 1000| and |has a streak of 12|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 12 or streak2 > 12 or streak3 > 12: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 12 and streak2 <= 12 and streak3 <= 12: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 1000) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - -# VeryHard -if choice == "VH": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 10000) - print("VeryHard Mode is |between 1 and 10000| and |has a streak of 16|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 16 or streak2 > 16 or streak3 > 16: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 16 and streak2 <= 16 and streak3 <= 16: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 10000) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 -# Extreme -if choice == "EX": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 100000) - print("Extreme Mode is |between 1 and 100000| and |has a streak of 20|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 20 or streak2 > 20 or streak3 > 20: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 20 and streak2 <= 20 and streak3 <= 20: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 100000) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - -# Impossible -if choice == "I": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 1000000) - print("Impossible Mode is |between 1 and 1000000| and |has a streak of 24|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 24 or streak2 > 24 or streak3 > 24: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 24 and streak2 <= 24 and streak3 <= 24: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 1000000) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - -# Impossible 2 -if choice == "I2": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 10000000) - print("Impossible2 Mode is |between 1 and 10000000| and |has a streak of 28|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 28 or streak2 > 28 or streak3 > 28: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 28 and streak2 <= 28 and streak3 <= 28: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 10000000) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - -# Impossible 3 -if choice == "I3": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 100000000) - print("Impossible3 Mode is |between 1 and 100000000| and |has a streak of 34|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 34 or streak2 > 34 or streak3 > 34: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 34 and streak2 <= 34 and streak3 <= 34: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 100000000) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - - -# Custom -if choice == "C": - diff = 0 - while pasw == 1: - if start == 1: - devx = int(input("X: ")) - devy = int(input("Y: ")) - streakamount = int(input("Streak: ")) - number = randint(devx, devy) - print("Custom Mode is |between ", devx, " and ", devy,"| and |has a streak of ", streakamount,"|", sep='') - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > streakamount or streak2 > streakamount or streak3 > streakamount: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= streakamount and streak2 <= streakamount and streak3 <= streakamount: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(devx, devy) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - -# Learn -if choice == "L": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 10) - if dev == 1: - print(number) - print("Choose a number between 1 and 10") - lesson = 1 - start = 2 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - if lesson == 1: - if guesscount <= 5: - print("You completed the level!") - guesscount = 1 - lesson = 2 - if guesscount > 5: - print("You failed the level!") - print("To complete the level, use less than 5 tries") - guesscount = 1 - number = randint(1, 10) - if dev == 1: - print(number) - print("Choose a number between 1 and 10") - - if lesson == 2: - if less == 1: - number = randint(1, 100) - if dev == 1: - print(number) - print("Choose a number between 1 and 100") - less = 0 - if number == numberguess: - if guesscount <= 10: + # Easy + if choice == "E": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 10) + print("Easy Mode is |between 1 and 10| and |has a streak of 3|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 3 or streak2 > 3 or streak3 > 3: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 3 and streak2 <= 3 and streak3 <= 3: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 10) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + + # Medium + if choice == "M": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 100) + print("Medium Mode is |between 1 and 100| and |has a streak of 8|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 8 or streak2 > 8 or streak3 > 8: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 8 and streak2 <= 8 and streak3 <= 8: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 100) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + + # Hard + if choice == "H": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 1000) + print("Hard Mode is |between 1 and 1000| and |has a streak of 12|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 12 or streak2 > 12 or streak3 > 12: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 12 and streak2 <= 12 and streak3 <= 12: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 1000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + + # VeryHard + if choice == "VH": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 10000) + print("VeryHard Mode is |between 1 and 10000| and |has a streak of 16|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 16 or streak2 > 16 or streak3 > 16: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 16 and streak2 <= 16 and streak3 <= 16: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 10000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + # Extreme + if choice == "EX": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 100000) + print("Extreme Mode is |between 1 and 100000| and |has a streak of 20|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 20 or streak2 > 20 or streak3 > 20: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 20 and streak2 <= 20 and streak3 <= 20: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 100000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + + # Impossible + if choice == "I": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 1000000) + print("Impossible Mode is |between 1 and 1000000| and |has a streak of 24|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 24 or streak2 > 24 or streak3 > 24: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 24 and streak2 <= 24 and streak3 <= 24: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 1000000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + + # Impossible 2 + if choice == "I2": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 10000000) + print("Impossible2 Mode is |between 1 and 10000000| and |has a streak of 28|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 28 or streak2 > 28 or streak3 > 28: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 28 and streak2 <= 28 and streak3 <= 28: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 10000000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + + # Impossible 3 + if choice == "I3": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 100000000) + print("Impossible3 Mode is |between 1 and 100000000| and |has a streak of 34|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 34 or streak2 > 34 or streak3 > 34: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 34 and streak2 <= 34 and streak3 <= 34: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 100000000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + + + # Custom + if choice == "C": + diff = 0 + while pasw == 1: + if start == 1: + devx = int(input("X: ")) + devy = int(input("Y: ")) + streakamount = int(input("Streak: ")) + number = randint(devx, devy) + print("Custom Mode is |between ", devx, " and ", devy,"| and |has a streak of ", streakamount,"|", sep='') + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > streakamount or streak2 > streakamount or streak3 > streakamount: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= streakamount and streak2 <= streakamount and streak3 <= streakamount: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(devx, devy) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + + # Learn + if choice == "L": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 10) + if dev == 1: + print(number) + print("Choose a number between 1 and 10") + lesson = 1 + start = 2 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + if lesson == 1: + if guesscount <= 5: print("You completed the level!") guesscount = 1 - less = 1 - lesson = 3 - if guesscount > 10: + lesson = 2 + if guesscount > 5: print("You failed the level!") - print("To complete the level, use less than 10 tries") + print("To complete the level, use less than 5 tries") guesscount = 1 + number = randint(1, 10) + if dev == 1: + print(number) + print("Choose a number between 1 and 10") + + if lesson == 2: + if less == 1: number = randint(1, 100) if dev == 1: print(number) print("Choose a number between 1 and 100") - - if lesson == 3: - if less == 1: - number = randint(1, 1000) - if dev == 1: - print(number) - print("Choose a number between 1 and 1000") - less = 0 - if number == numberguess: - if guesscount <= 20: - print("You completed the level!") - guesscount = 1 - less = 1 - lesson = 4 - if guesscount > 20: - print("You failed the level!") - print("To complete the level, use less than 20 tries") - guesscount = 1 + less = 0 + if number == numberguess: + if guesscount <= 10: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 3 + if guesscount > 10: + print("You failed the level!") + print("To complete the level, use less than 10 tries") + guesscount = 1 + number = randint(1, 100) + if dev == 1: + print(number) + print("Choose a number between 1 and 100") + + if lesson == 3: + if less == 1: number = randint(1, 1000) if dev == 1: print(number) print("Choose a number between 1 and 1000") - - if lesson == 4: - if less == 1: - number = randint(1, 10000) - if dev == 1: - print(number) - print("Choose a number between 1 and 10000") - less = 0 - if number == numberguess: - if guesscount <= 40: - print("You completed the level!") - guesscount = 1 - less = 1 - lesson = 5 - if guesscount > 40: - print("You failed the level!") - print("To complete the level, use less than 40 tries") - guesscount = 1 + less = 0 + if number == numberguess: + if guesscount <= 20: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 4 + if guesscount > 20: + print("You failed the level!") + print("To complete the level, use less than 20 tries") + guesscount = 1 + number = randint(1, 1000) + if dev == 1: + print(number) + print("Choose a number between 1 and 1000") + + if lesson == 4: + if less == 1: number = randint(1, 10000) if dev == 1: print(number) print("Choose a number between 1 and 10000") - - if lesson == 5: - if less == 1: - number = randint(1, 100000) - if dev == 1: - print(number) - print("Choose a number between 1 and 100000") - less = 0 - if number == numberguess: - if guesscount <= 80: - print("You completed the level!") - guesscount = 1 - less = 1 - lesson = 6 - if guesscount > 80: - print("You failed the level!") - print("To complete the level, use less than 80 tries") - guesscount = 1 + less = 0 + if number == numberguess: + if guesscount <= 40: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 5 + if guesscount > 40: + print("You failed the level!") + print("To complete the level, use less than 40 tries") + guesscount = 1 + number = randint(1, 10000) + if dev == 1: + print(number) + print("Choose a number between 1 and 10000") + + if lesson == 5: + if less == 1: number = randint(1, 100000) if dev == 1: print(number) print("Choose a number between 1 and 100000") - - if lesson == 6: - if less == 1: - number = randint(1, 1000000) - if dev == 1: - print(number) - print("Choose a number between 1 and 1000000") - less = 0 - if number == numberguess: - if guesscount <= 160: - print("You completed the level!") - print("You completed Learn Mode!") - print("Try Custom Mode if you want to make your own range") - guesscount = 1 - less = 1 - lesson = 0 - if guesscount > 160: - print("You failed the level!") - print("To complete the level, use less than 160 tries") - guesscount = 1 + less = 0 + if number == numberguess: + if guesscount <= 80: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 6 + if guesscount > 80: + print("You failed the level!") + print("To complete the level, use less than 80 tries") + guesscount = 1 + number = randint(1, 100000) + if dev == 1: + print(number) + print("Choose a number between 1 and 100000") + + if lesson == 6: + if less == 1: number = randint(1, 1000000) if dev == 1: print(number) - print("Choose a number between 1 and 1000000") - - guesscount = 1 - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 -else: - print("Please Retry") + print("Choose a number between 1 and 1000000") + less = 0 + if number == numberguess: + if guesscount <= 160: + print("You completed the level!") + print("You completed Learn Mode!") + print("Try Custom Mode if you want to make your own range") + guesscount = 1 + less = 1 + lesson = 0 + if guesscount > 160: + print("You failed the level!") + print("To complete the level, use less than 160 tries") + guesscount = 1 + number = randint(1, 1000000) + if dev == 1: + print(number) + print("Choose a number between 1 and 1000000") + + guesscount = 1 + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + else: + print("Please Retry") + diff = 1 From 54a3b1ea72eda9b418b5d55ad937953c3d5e25ec Mon Sep 17 00:00:00 2001 From: Nathan R Date: Mon, 13 Nov 2017 21:31:04 -0500 Subject: [PATCH 179/206] Update NumberGuesser.py --- Projects/NumberGuesser.py | 1138 ++++++++++++++++++------------------- 1 file changed, 568 insertions(+), 570 deletions(-) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser.py index 31ed498..fbee6c4 100644 --- a/Projects/NumberGuesser.py +++ b/Projects/NumberGuesser.py @@ -45,600 +45,598 @@ sleep(0.05) print("\n") # |Easy(1-10)|Medium(1-100)|Hard(1-100)|VeryHard(1-1000)|Extreme(1-10000)|Impossible(1-100000)|Impossible2(1-1000000)|Impossible3(1-100000000)Custom|Learn| - while diff == 1: choice = input("|E|M|H|VH|EX|I|I2|I3|C|L|:") diff = 0 - # Easy - if choice == "E": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 10) - print("Easy Mode is |between 1 and 10| and |has a streak of 3|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 3 or streak2 > 3 or streak3 > 3: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 3 and streak2 <= 3 and streak3 <= 3: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 10) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - - # Medium - if choice == "M": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 100) - print("Medium Mode is |between 1 and 100| and |has a streak of 8|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 8 or streak2 > 8 or streak3 > 8: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 8 and streak2 <= 8 and streak3 <= 8: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 100) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - - # Hard - if choice == "H": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 1000) - print("Hard Mode is |between 1 and 1000| and |has a streak of 12|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 12 or streak2 > 12 or streak3 > 12: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 12 and streak2 <= 12 and streak3 <= 12: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 1000) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - - # VeryHard - if choice == "VH": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 10000) - print("VeryHard Mode is |between 1 and 10000| and |has a streak of 16|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 16 or streak2 > 16 or streak3 > 16: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 16 and streak2 <= 16 and streak3 <= 16: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 10000) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - # Extreme - if choice == "EX": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 100000) - print("Extreme Mode is |between 1 and 100000| and |has a streak of 20|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 20 or streak2 > 20 or streak3 > 20: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 20 and streak2 <= 20 and streak3 <= 20: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 100000) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - - # Impossible - if choice == "I": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 1000000) - print("Impossible Mode is |between 1 and 1000000| and |has a streak of 24|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 24 or streak2 > 24 or streak3 > 24: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 24 and streak2 <= 24 and streak3 <= 24: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 1000000) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - - # Impossible 2 - if choice == "I2": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 10000000) - print("Impossible2 Mode is |between 1 and 10000000| and |has a streak of 28|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 28 or streak2 > 28 or streak3 > 28: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 28 and streak2 <= 28 and streak3 <= 28: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 10000000) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - - # Impossible 3 - if choice == "I3": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 100000000) - print("Impossible3 Mode is |between 1 and 100000000| and |has a streak of 34|") - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > 34 or streak2 > 34 or streak3 > 34: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= 34 and streak2 <= 34 and streak3 <= 34: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(1, 100000000) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - - - # Custom - if choice == "C": - diff = 0 - while pasw == 1: - if start == 1: - devx = int(input("X: ")) - devy = int(input("Y: ")) - streakamount = int(input("Streak: ")) - number = randint(devx, devy) - print("Custom Mode is |between ", devx, " and ", devy,"| and |has a streak of ", streakamount,"|", sep='') - if dev == 1: - print(number) - start = 0 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - streakcount += 1 - streakguess += guesscount - if streak1 > streakamount or streak2 > streakamount or streak3 > streakamount: - streakcount = 1 - if streakcount == 1: - streak1 = guesscount - if streakcount == 2: - streak2 = guesscount - if streakcount == 3: - streak3 = guesscount - if streak1 <= streakamount and streak2 <= streakamount and streak3 <= streakamount: - print("Streak!") - else: - print("No Streak!") - streak1 = 0 - streak2 = 0 - streak3 = 0 - streakguess = 0 - streakcount = 0 - guesscount = 1 - number = randint(devx, devy) - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - - # Learn - if choice == "L": - diff = 0 - while pasw == 1: - if start == 1: - number = randint(1, 10) - if dev == 1: - print(number) - print("Choose a number between 1 and 10") - lesson = 1 - start = 2 - numberguess = int(input("Number:")) - if number == numberguess: - print("Correct!") - print("You guessed the number in", guesscount, "tries") - if lesson == 1: - if guesscount <= 5: +# Easy +if choice == "E": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 10) + print("Easy Mode is |between 1 and 10| and |has a streak of 3|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 3 or streak2 > 3 or streak3 > 3: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 3 and streak2 <= 3 and streak3 <= 3: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 10) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + +# Medium +if choice == "M": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 100) + print("Medium Mode is |between 1 and 100| and |has a streak of 8|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 8 or streak2 > 8 or streak3 > 8: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 8 and streak2 <= 8 and streak3 <= 8: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 100) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + +# Hard +if choice == "H": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 1000) + print("Hard Mode is |between 1 and 1000| and |has a streak of 12|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 12 or streak2 > 12 or streak3 > 12: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 12 and streak2 <= 12 and streak3 <= 12: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 1000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + +# VeryHard +if choice == "VH": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 10000) + print("VeryHard Mode is |between 1 and 10000| and |has a streak of 16|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 16 or streak2 > 16 or streak3 > 16: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 16 and streak2 <= 16 and streak3 <= 16: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 10000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 +# Extreme +if choice == "EX": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 100000) + print("Extreme Mode is |between 1 and 100000| and |has a streak of 20|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 20 or streak2 > 20 or streak3 > 20: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 20 and streak2 <= 20 and streak3 <= 20: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 100000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + +# Impossible +if choice == "I": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 1000000) + print("Impossible Mode is |between 1 and 1000000| and |has a streak of 24|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 24 or streak2 > 24 or streak3 > 24: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 24 and streak2 <= 24 and streak3 <= 24: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 1000000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + +# Impossible 2 +if choice == "I2": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 10000000) + print("Impossible2 Mode is |between 1 and 10000000| and |has a streak of 28|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 28 or streak2 > 28 or streak3 > 28: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 28 and streak2 <= 28 and streak3 <= 28: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 10000000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + +# Impossible 3 +if choice == "I3": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 100000000) + print("Impossible3 Mode is |between 1 and 100000000| and |has a streak of 34|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 34 or streak2 > 34 or streak3 > 34: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 34 and streak2 <= 34 and streak3 <= 34: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 100000000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + + +# Custom +if choice == "C": + diff = 0 + while pasw == 1: + if start == 1: + devx = int(input("X: ")) + devy = int(input("Y: ")) + streakamount = int(input("Streak: ")) + number = randint(devx, devy) + print("Custom Mode is |between ", devx, " and ", devy,"| and |has a streak of ", streakamount,"|", sep='') + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > streakamount or streak2 > streakamount or streak3 > streakamount: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= streakamount and streak2 <= streakamount and streak3 <= streakamount: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(devx, devy) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + +# Learn +if choice == "L": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 10) + if dev == 1: + print(number) + print("Choose a number between 1 and 10") + lesson = 1 + start = 2 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + if lesson == 1: + if guesscount <= 5: + print("You completed the level!") + guesscount = 1 + lesson = 2 + if guesscount > 5: + print("You failed the level!") + print("To complete the level, use less than 5 tries") + guesscount = 1 + number = randint(1, 10) + if dev == 1: + print(number) + print("Choose a number between 1 and 10") + + if lesson == 2: + if less == 1: + number = randint(1, 100) + if dev == 1: + print(number) + print("Choose a number between 1 and 100") + less = 0 + if number == numberguess: + if guesscount <= 10: print("You completed the level!") guesscount = 1 - lesson = 2 - if guesscount > 5: + less = 1 + lesson = 3 + if guesscount > 10: print("You failed the level!") - print("To complete the level, use less than 5 tries") + print("To complete the level, use less than 10 tries") guesscount = 1 - number = randint(1, 10) - if dev == 1: - print(number) - print("Choose a number between 1 and 10") - - if lesson == 2: - if less == 1: number = randint(1, 100) if dev == 1: print(number) print("Choose a number between 1 and 100") - less = 0 - if number == numberguess: - if guesscount <= 10: - print("You completed the level!") - guesscount = 1 - less = 1 - lesson = 3 - if guesscount > 10: - print("You failed the level!") - print("To complete the level, use less than 10 tries") - guesscount = 1 - number = randint(1, 100) - if dev == 1: - print(number) - print("Choose a number between 1 and 100") - - if lesson == 3: - if less == 1: + + if lesson == 3: + if less == 1: + number = randint(1, 1000) + if dev == 1: + print(number) + print("Choose a number between 1 and 1000") + less = 0 + if number == numberguess: + if guesscount <= 20: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 4 + if guesscount > 20: + print("You failed the level!") + print("To complete the level, use less than 20 tries") + guesscount = 1 number = randint(1, 1000) if dev == 1: print(number) print("Choose a number between 1 and 1000") - less = 0 - if number == numberguess: - if guesscount <= 20: - print("You completed the level!") - guesscount = 1 - less = 1 - lesson = 4 - if guesscount > 20: - print("You failed the level!") - print("To complete the level, use less than 20 tries") - guesscount = 1 - number = randint(1, 1000) - if dev == 1: - print(number) - print("Choose a number between 1 and 1000") - - if lesson == 4: - if less == 1: + + if lesson == 4: + if less == 1: + number = randint(1, 10000) + if dev == 1: + print(number) + print("Choose a number between 1 and 10000") + less = 0 + if number == numberguess: + if guesscount <= 40: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 5 + if guesscount > 40: + print("You failed the level!") + print("To complete the level, use less than 40 tries") + guesscount = 1 number = randint(1, 10000) if dev == 1: print(number) print("Choose a number between 1 and 10000") - less = 0 - if number == numberguess: - if guesscount <= 40: - print("You completed the level!") - guesscount = 1 - less = 1 - lesson = 5 - if guesscount > 40: - print("You failed the level!") - print("To complete the level, use less than 40 tries") - guesscount = 1 - number = randint(1, 10000) - if dev == 1: - print(number) - print("Choose a number between 1 and 10000") - - if lesson == 5: - if less == 1: + + if lesson == 5: + if less == 1: + number = randint(1, 100000) + if dev == 1: + print(number) + print("Choose a number between 1 and 100000") + less = 0 + if number == numberguess: + if guesscount <= 80: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 6 + if guesscount > 80: + print("You failed the level!") + print("To complete the level, use less than 80 tries") + guesscount = 1 number = randint(1, 100000) if dev == 1: print(number) print("Choose a number between 1 and 100000") - less = 0 - if number == numberguess: - if guesscount <= 80: - print("You completed the level!") - guesscount = 1 - less = 1 - lesson = 6 - if guesscount > 80: - print("You failed the level!") - print("To complete the level, use less than 80 tries") - guesscount = 1 - number = randint(1, 100000) - if dev == 1: - print(number) - print("Choose a number between 1 and 100000") - - if lesson == 6: - if less == 1: + + if lesson == 6: + if less == 1: + number = randint(1, 1000000) + if dev == 1: + print(number) + print("Choose a number between 1 and 1000000") + less = 0 + if number == numberguess: + if guesscount <= 160: + print("You completed the level!") + print("You completed Learn Mode!") + print("Try Custom Mode if you want to make your own range") + guesscount = 1 + less = 1 + lesson = 0 + if guesscount > 160: + print("You failed the level!") + print("To complete the level, use less than 160 tries") + guesscount = 1 number = randint(1, 1000000) if dev == 1: print(number) - print("Choose a number between 1 and 1000000") - less = 0 - if number == numberguess: - if guesscount <= 160: - print("You completed the level!") - print("You completed Learn Mode!") - print("Try Custom Mode if you want to make your own range") - guesscount = 1 - less = 1 - lesson = 0 - if guesscount > 160: - print("You failed the level!") - print("To complete the level, use less than 160 tries") - guesscount = 1 - number = randint(1, 1000000) - if dev == 1: - print(number) - print("Choose a number between 1 and 1000000") - - guesscount = 1 - if dev == 1: - print(number) - pasw = 1 - elif number > numberguess: - print("More") - guesscount += 1 - elif number < numberguess: - print("Less") - guesscount += 1 - elif number != numberguess: - print("Wrong!") - pasw = 1 - else: - print("Please Retry") - diff = 1 + print("Choose a number between 1 and 1000000") + + guesscount = 1 + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 +else: + print("Please Retry") From 99f8057416faba8c13da79e6f95282ce5b2ae528 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 14 Nov 2017 16:12:13 -0500 Subject: [PATCH 180/206] Create PyCalc --- Projects/PyCalc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Projects/PyCalc diff --git a/Projects/PyCalc b/Projects/PyCalc new file mode 100644 index 0000000..d569dd7 --- /dev/null +++ b/Projects/PyCalc @@ -0,0 +1,15 @@ +# PyCalc +# Created by Nathan R (Mosrod) https://github.com/Mosrod + +# Imports + +# Variables + +# Definitions +def add(): + x = input("Num1: ") + y = input("Num2: ") + z = x+y + +# Code + From e47ddf35e9a926f8b8380d1fd6c84a5c8e356958 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 14 Nov 2017 16:12:27 -0500 Subject: [PATCH 181/206] Rename PyCalc to PyCalc.py --- Projects/{PyCalc => PyCalc.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Projects/{PyCalc => PyCalc.py} (100%) diff --git a/Projects/PyCalc b/Projects/PyCalc.py similarity index 100% rename from Projects/PyCalc rename to Projects/PyCalc.py From bb131a8fed9995b67426a1633134f30b99b82668 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 12 Dec 2017 10:09:37 -0500 Subject: [PATCH 182/206] Create NumberGuesserBeta.py --- Projects/NumberGuesserBeta.py | 650 ++++++++++++++++++++++++++++++++++ 1 file changed, 650 insertions(+) create mode 100644 Projects/NumberGuesserBeta.py diff --git a/Projects/NumberGuesserBeta.py b/Projects/NumberGuesserBeta.py new file mode 100644 index 0000000..d84234c --- /dev/null +++ b/Projects/NumberGuesserBeta.py @@ -0,0 +1,650 @@ +# Number Guesser +# Created by Nathan R (Mosrod) https://github.com/Mosrod + +# Imports +from random import * +from time import sleep +import sys + +# Variables +pasw = 1 +start = 1 +number = 0 +diff = 1 +guesscount = 1 +less = 1 +streakcount = 0 +streakguess = 0 +streak1 = 0 +streak2 = 0 +streak3 = 0 +streak = 0 +# Prints All Numbers (Change to dev = 1 to enable) +dev = 1 + +# Code +if start == 1: + text = "Welcome to Number Guesser" + for character in text: + sys.stdout.write(character) + sleep(0.1) + print("\n") + text = "Created by Nathan R (Mosrod)" + for character in text: + sys.stdout.write(character) + sleep(0.05) + print("\n") + text = "|Easy|Medium|Hard|VeryHard|Extreme|Impossible|Impossible2|Impossible3|Custom|Learn|" + for character in text: + sys.stdout.write(character) + sleep(0.02) + print("\n") +if dev == 1: + text = "You are a developer!" + for character in text: + sys.stdout.write(character) + sleep(0.05) + print("\n") +# |Easy(1-10)|Medium(1-100)|Hard(1-100)|VeryHard(1-1000)|Extreme(1-10000)|Impossible(1-100000)|Impossible2(1-1000000)|Impossible3(1-100000000)Custom|Learn| +while diff == 1: + choice = input("|E|M|H|VH|EX|I|I2|I3|C|L|:") + diff = 0 + +# Easy +if choice == "E": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 10) + print("Easy Mode is |between 1 and 10| and |has a streak of 3|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 3 or streak2 > 3 or streak3 > 3: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 3 and streak2 <= 3 and streak3 <= 3: + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + else: + streak = 0 + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 10) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + +# Medium +if choice == "M": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 100) + print("Medium Mode is |between 1 and 100| and |has a streak of 8|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 8 or streak2 > 8 or streak3 > 8: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 8 and streak2 <= 8 and streak3 <= 8: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 100) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + +# Hard +if choice == "H": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 1000) + print("Hard Mode is |between 1 and 1000| and |has a streak of 12|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 12 or streak2 > 12 or streak3 > 12: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 12 and streak2 <= 12 and streak3 <= 12: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 1000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + +# VeryHard +if choice == "VH": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 10000) + print("VeryHard Mode is |between 1 and 10000| and |has a streak of 16|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 16 or streak2 > 16 or streak3 > 16: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 16 and streak2 <= 16 and streak3 <= 16: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 10000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 +# Extreme +if choice == "EX": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 100000) + print("Extreme Mode is |between 1 and 100000| and |has a streak of 20|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 20 or streak2 > 20 or streak3 > 20: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 20 and streak2 <= 20 and streak3 <= 20: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 100000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + +# Impossible +if choice == "I": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 1000000) + print("Impossible Mode is |between 1 and 1000000| and |has a streak of 24|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 24 or streak2 > 24 or streak3 > 24: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 24 and streak2 <= 24 and streak3 <= 24: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 1000000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + +# Impossible 2 +if choice == "I2": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 10000000) + print("Impossible2 Mode is |between 1 and 10000000| and |has a streak of 28|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 28 or streak2 > 28 or streak3 > 28: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 28 and streak2 <= 28 and streak3 <= 28: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 10000000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + +# Impossible 3 +if choice == "I3": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 100000000) + print("Impossible3 Mode is |between 1 and 100000000| and |has a streak of 34|") + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > 34 or streak2 > 34 or streak3 > 34: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= 34 and streak2 <= 34 and streak3 <= 34: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(1, 100000000) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + + +# Custom +if choice == "C": + diff = 0 + while pasw == 1: + if start == 1: + devx = int(input("X: ")) + devy = int(input("Y: ")) + streakamount = int(input("Streak: ")) + number = randint(devx, devy) + print("Custom Mode is |between ", devx, " and ", devy,"| and |has a streak of ", streakamount,"|", sep='') + if dev == 1: + print(number) + start = 0 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + streakcount += 1 + streakguess += guesscount + if streak1 > streakamount or streak2 > streakamount or streak3 > streakamount: + streakcount = 1 + if streakcount == 1: + streak1 = guesscount + if streakcount == 2: + streak2 = guesscount + if streakcount == 3: + streak3 = guesscount + if streak1 <= streakamount and streak2 <= streakamount and streak3 <= streakamount: + print("Streak!") + else: + print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + guesscount = 1 + number = randint(devx, devy) + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 + +# Learn +if choice == "L": + diff = 0 + while pasw == 1: + if start == 1: + number = randint(1, 10) + if dev == 1: + print(number) + print("Choose a number between 1 and 10") + lesson = 1 + start = 2 + numberguess = int(input("Number:")) + if number == numberguess: + print("Correct!") + print("You guessed the number in", guesscount, "tries") + if lesson == 1: + if guesscount <= 5: + print("You completed the level!") + guesscount = 1 + lesson = 2 + if guesscount > 5: + print("You failed the level!") + print("To complete the level, use less than 5 tries") + guesscount = 1 + number = randint(1, 10) + if dev == 1: + print(number) + print("Choose a number between 1 and 10") + + if lesson == 2: + if less == 1: + number = randint(1, 100) + if dev == 1: + print(number) + print("Choose a number between 1 and 100") + less = 0 + if number == numberguess: + if guesscount <= 10: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 3 + if guesscount > 10: + print("You failed the level!") + print("To complete the level, use less than 10 tries") + guesscount = 1 + number = randint(1, 100) + if dev == 1: + print(number) + print("Choose a number between 1 and 100") + + if lesson == 3: + if less == 1: + number = randint(1, 1000) + if dev == 1: + print(number) + print("Choose a number between 1 and 1000") + less = 0 + if number == numberguess: + if guesscount <= 20: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 4 + if guesscount > 20: + print("You failed the level!") + print("To complete the level, use less than 20 tries") + guesscount = 1 + number = randint(1, 1000) + if dev == 1: + print(number) + print("Choose a number between 1 and 1000") + + if lesson == 4: + if less == 1: + number = randint(1, 10000) + if dev == 1: + print(number) + print("Choose a number between 1 and 10000") + less = 0 + if number == numberguess: + if guesscount <= 40: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 5 + if guesscount > 40: + print("You failed the level!") + print("To complete the level, use less than 40 tries") + guesscount = 1 + number = randint(1, 10000) + if dev == 1: + print(number) + print("Choose a number between 1 and 10000") + + if lesson == 5: + if less == 1: + number = randint(1, 100000) + if dev == 1: + print(number) + print("Choose a number between 1 and 100000") + less = 0 + if number == numberguess: + if guesscount <= 80: + print("You completed the level!") + guesscount = 1 + less = 1 + lesson = 6 + if guesscount > 80: + print("You failed the level!") + print("To complete the level, use less than 80 tries") + guesscount = 1 + number = randint(1, 100000) + if dev == 1: + print(number) + print("Choose a number between 1 and 100000") + + if lesson == 6: + if less == 1: + number = randint(1, 1000000) + if dev == 1: + print(number) + print("Choose a number between 1 and 1000000") + less = 0 + if number == numberguess: + if guesscount <= 160: + print("You completed the level!") + print("You completed Learn Mode!") + print("Try Custom Mode if you want to make your own range") + guesscount = 1 + less = 1 + lesson = 0 + if guesscount > 160: + print("You failed the level!") + print("To complete the level, use less than 160 tries") + guesscount = 1 + number = randint(1, 1000000) + if dev == 1: + print(number) + print("Choose a number between 1 and 1000000") + + guesscount = 1 + if dev == 1: + print(number) + pasw = 1 + elif number > numberguess: + print("More") + guesscount += 1 + elif number < numberguess: + print("Less") + guesscount += 1 + elif number != numberguess: + print("Wrong!") + pasw = 1 +else: + print("Please Retry") From 910997d3cc825773eefebc5bfbd2898f3b4d4abf Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 12 Dec 2017 10:09:51 -0500 Subject: [PATCH 183/206] Rename Projects/NumberGuesser.py to Projects/NumberGuesser/NumberGuesser.py --- Projects/{ => NumberGuesser}/NumberGuesser.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Projects/{ => NumberGuesser}/NumberGuesser.py (100%) diff --git a/Projects/NumberGuesser.py b/Projects/NumberGuesser/NumberGuesser.py similarity index 100% rename from Projects/NumberGuesser.py rename to Projects/NumberGuesser/NumberGuesser.py From 3781ffeb276e266b6d5d89a8137344170b17609a Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 12 Dec 2017 10:10:06 -0500 Subject: [PATCH 184/206] Rename Projects/NumberGuesserBeta.py to Projects/NumberGuesser/NumberGuesserBeta.py --- Projects/{ => NumberGuesser}/NumberGuesserBeta.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Projects/{ => NumberGuesser}/NumberGuesserBeta.py (100%) diff --git a/Projects/NumberGuesserBeta.py b/Projects/NumberGuesser/NumberGuesserBeta.py similarity index 100% rename from Projects/NumberGuesserBeta.py rename to Projects/NumberGuesser/NumberGuesserBeta.py From c30dbc54eb8c8051ae3f98021e17d261c1906128 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Wed, 13 Dec 2017 18:49:33 -0500 Subject: [PATCH 185/206] Update NumberGuesserBeta.py --- Projects/NumberGuesser/NumberGuesserBeta.py | 138 ++++++++++++++++++-- 1 file changed, 129 insertions(+), 9 deletions(-) diff --git a/Projects/NumberGuesser/NumberGuesserBeta.py b/Projects/NumberGuesser/NumberGuesserBeta.py index d84234c..35a5f5f 100644 --- a/Projects/NumberGuesser/NumberGuesserBeta.py +++ b/Projects/NumberGuesser/NumberGuesserBeta.py @@ -83,18 +83,26 @@ streakguess = 0 streakcount = 0 else: - streak = 0 print("No Streak!") streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 + if streak1 > 3 or streak2 > 3 or streak3 > 3: + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 10) if dev == 1: print(number) pasw = 1 + elif number > numberguess: print("More") guesscount += 1 @@ -130,14 +138,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 8 and streak2 <= 8 and streak3 <= 8: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 8 or streak2 > 8 or streak3 > 8: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 100) if dev == 1: @@ -178,14 +200,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 12 and streak2 <= 12 and streak3 <= 12: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 12 or streak2 > 12 or streak3 > 12: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 1000) if dev == 1: @@ -226,14 +262,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 16 and streak2 <= 16 and streak3 <= 16: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 16 or streak2 > 16 or streak3 > 16: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 10000) if dev == 1: @@ -273,14 +323,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 20 and streak2 <= 20 and streak3 <= 20: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 20 or streak2 > 20 or streak3 > 20: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 100000) if dev == 1: @@ -321,14 +385,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 24 and streak2 <= 24 and streak3 <= 24: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 24 or streak2 > 24 or streak3 > 24: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 1000000) if dev == 1: @@ -369,14 +447,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 28 and streak2 <= 28 and streak3 <= 28: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 28 or streak2 > 28 or streak3 > 28: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 10000000) if dev == 1: @@ -417,14 +509,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 34 and streak2 <= 34 and streak3 <= 34: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 34 or streak2 > 34 or streak3 > 34: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 100000000) if dev == 1: @@ -469,14 +575,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= streakamount and streak2 <= streakamount and streak3 <= streakamount: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > streakamount or streak2 > streakamount or streak3 > streakamount: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(devx, devy) if dev == 1: From afaa3f59363a2d258dde5e893dbe8f26a51336eb Mon Sep 17 00:00:00 2001 From: Nathan R Date: Wed, 13 Dec 2017 18:49:43 -0500 Subject: [PATCH 186/206] Update NumberGuesser.py --- Projects/NumberGuesser/NumberGuesser.py | 148 ++++++++++++++++++++++-- 1 file changed, 138 insertions(+), 10 deletions(-) diff --git a/Projects/NumberGuesser/NumberGuesser.py b/Projects/NumberGuesser/NumberGuesser.py index fbee6c4..35a5f5f 100644 --- a/Projects/NumberGuesser/NumberGuesser.py +++ b/Projects/NumberGuesser/NumberGuesser.py @@ -18,8 +18,9 @@ streak1 = 0 streak2 = 0 streak3 = 0 +streak = 0 # Prints All Numbers (Change to dev = 1 to enable) -dev = 0 +dev = 1 # Code if start == 1: @@ -74,19 +75,34 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 3 and streak2 <= 3 and streak3 <= 3: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 3 or streak2 > 3 or streak3 > 3: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 10) if dev == 1: print(number) pasw = 1 + elif number > numberguess: print("More") guesscount += 1 @@ -122,14 +138,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 8 and streak2 <= 8 and streak3 <= 8: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 8 or streak2 > 8 or streak3 > 8: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 100) if dev == 1: @@ -170,14 +200,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 12 and streak2 <= 12 and streak3 <= 12: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 12 or streak2 > 12 or streak3 > 12: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 1000) if dev == 1: @@ -218,14 +262,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 16 and streak2 <= 16 and streak3 <= 16: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 16 or streak2 > 16 or streak3 > 16: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 10000) if dev == 1: @@ -265,14 +323,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 20 and streak2 <= 20 and streak3 <= 20: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 20 or streak2 > 20 or streak3 > 20: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 100000) if dev == 1: @@ -313,14 +385,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 24 and streak2 <= 24 and streak3 <= 24: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 24 or streak2 > 24 or streak3 > 24: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 1000000) if dev == 1: @@ -361,14 +447,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 28 and streak2 <= 28 and streak3 <= 28: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 28 or streak2 > 28 or streak3 > 28: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 10000000) if dev == 1: @@ -409,14 +509,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= 34 and streak2 <= 34 and streak3 <= 34: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > 34 or streak2 > 34 or streak3 > 34: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(1, 100000000) if dev == 1: @@ -461,14 +575,28 @@ if streakcount == 3: streak3 = guesscount if streak1 <= streakamount and streak2 <= streakamount and streak3 <= streakamount: - print("Streak!") + streak += 1 + print("Streak ", streak, "!", sep='') + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 else: print("No Streak!") + streak1 = 0 + streak2 = 0 + streak3 = 0 + streakguess = 0 + streakcount = 0 + streak = 0 + if streak1 > streakamount or streak2 > streakamount or streak3 > streakamount: streak1 = 0 streak2 = 0 streak3 = 0 streakguess = 0 streakcount = 0 + streak = 0 guesscount = 1 number = randint(devx, devy) if dev == 1: From 2d57363017291482ec2931b015ca6dd8df9d23a5 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Wed, 13 Dec 2017 18:52:30 -0500 Subject: [PATCH 187/206] Update NumberGuesser.py --- Projects/NumberGuesser/NumberGuesser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects/NumberGuesser/NumberGuesser.py b/Projects/NumberGuesser/NumberGuesser.py index 35a5f5f..cd4f0ce 100644 --- a/Projects/NumberGuesser/NumberGuesser.py +++ b/Projects/NumberGuesser/NumberGuesser.py @@ -20,7 +20,7 @@ streak3 = 0 streak = 0 # Prints All Numbers (Change to dev = 1 to enable) -dev = 1 +dev = 0 # Code if start == 1: From cdb9b0f9ca53d08e9cc7e35e9bd3d1b9dc6e7962 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 14 Dec 2017 15:44:56 -0500 Subject: [PATCH 188/206] Update NumberGuesser.py --- Projects/NumberGuesser/NumberGuesser.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Projects/NumberGuesser/NumberGuesser.py b/Projects/NumberGuesser/NumberGuesser.py index cd4f0ce..9bb7732 100644 --- a/Projects/NumberGuesser/NumberGuesser.py +++ b/Projects/NumberGuesser/NumberGuesser.py @@ -51,7 +51,7 @@ diff = 0 # Easy -if choice == "E": +if choice == "E" or choice == "e": diff = 0 while pasw == 1: if start == 1: @@ -114,7 +114,7 @@ pasw = 1 # Medium -if choice == "M": +if choice == "M" or choice == "m": diff = 0 while pasw == 1: if start == 1: @@ -176,7 +176,7 @@ pasw = 1 # Hard -if choice == "H": +if choice == "H" or choice == "h": diff = 0 while pasw == 1: if start == 1: @@ -238,7 +238,7 @@ pasw = 1 # VeryHard -if choice == "VH": +if choice == "VH" or choice == "vh" or choice == "Vh" or choice == "vH": diff = 0 while pasw == 1: if start == 1: @@ -299,7 +299,7 @@ print("Wrong!") pasw = 1 # Extreme -if choice == "EX": +if choice == "EX" or choice == "ex" or choice == "Ex" or choice == "eX": diff = 0 while pasw == 1: if start == 1: @@ -361,7 +361,7 @@ pasw = 1 # Impossible -if choice == "I": +if choice == "I" or choice == "i": diff = 0 while pasw == 1: if start == 1: @@ -423,7 +423,7 @@ pasw = 1 # Impossible 2 -if choice == "I2": +if choice == "I2" or choice == "i2": diff = 0 while pasw == 1: if start == 1: @@ -485,7 +485,7 @@ pasw = 1 # Impossible 3 -if choice == "I3": +if choice == "I3" or choice == "i3": diff = 0 while pasw == 1: if start == 1: @@ -548,7 +548,7 @@ # Custom -if choice == "C": +if choice == "C" or choice == "c": diff = 0 while pasw == 1: if start == 1: @@ -613,7 +613,7 @@ pasw = 1 # Learn -if choice == "L": +if choice == "L" or choice == "l": diff = 0 while pasw == 1: if start == 1: From fc82241a0ffb6b041c9b690d45e933cac8b946d3 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Thu, 14 Dec 2017 15:45:07 -0500 Subject: [PATCH 189/206] Update NumberGuesserBeta.py --- Projects/NumberGuesser/NumberGuesserBeta.py | 22 ++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Projects/NumberGuesser/NumberGuesserBeta.py b/Projects/NumberGuesser/NumberGuesserBeta.py index 35a5f5f..9bb7732 100644 --- a/Projects/NumberGuesser/NumberGuesserBeta.py +++ b/Projects/NumberGuesser/NumberGuesserBeta.py @@ -20,7 +20,7 @@ streak3 = 0 streak = 0 # Prints All Numbers (Change to dev = 1 to enable) -dev = 1 +dev = 0 # Code if start == 1: @@ -51,7 +51,7 @@ diff = 0 # Easy -if choice == "E": +if choice == "E" or choice == "e": diff = 0 while pasw == 1: if start == 1: @@ -114,7 +114,7 @@ pasw = 1 # Medium -if choice == "M": +if choice == "M" or choice == "m": diff = 0 while pasw == 1: if start == 1: @@ -176,7 +176,7 @@ pasw = 1 # Hard -if choice == "H": +if choice == "H" or choice == "h": diff = 0 while pasw == 1: if start == 1: @@ -238,7 +238,7 @@ pasw = 1 # VeryHard -if choice == "VH": +if choice == "VH" or choice == "vh" or choice == "Vh" or choice == "vH": diff = 0 while pasw == 1: if start == 1: @@ -299,7 +299,7 @@ print("Wrong!") pasw = 1 # Extreme -if choice == "EX": +if choice == "EX" or choice == "ex" or choice == "Ex" or choice == "eX": diff = 0 while pasw == 1: if start == 1: @@ -361,7 +361,7 @@ pasw = 1 # Impossible -if choice == "I": +if choice == "I" or choice == "i": diff = 0 while pasw == 1: if start == 1: @@ -423,7 +423,7 @@ pasw = 1 # Impossible 2 -if choice == "I2": +if choice == "I2" or choice == "i2": diff = 0 while pasw == 1: if start == 1: @@ -485,7 +485,7 @@ pasw = 1 # Impossible 3 -if choice == "I3": +if choice == "I3" or choice == "i3": diff = 0 while pasw == 1: if start == 1: @@ -548,7 +548,7 @@ # Custom -if choice == "C": +if choice == "C" or choice == "c": diff = 0 while pasw == 1: if start == 1: @@ -613,7 +613,7 @@ pasw = 1 # Learn -if choice == "L": +if choice == "L" or choice == "l": diff = 0 while pasw == 1: if start == 1: From d30efd3cb0fdc7f6e37aed370651d404ea5e26a1 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Wed, 7 Mar 2018 15:27:01 -0500 Subject: [PATCH 190/206] Create 1-2VariableSplitting.md --- Tutorials/1-2VariableSplitting.md | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Tutorials/1-2VariableSplitting.md diff --git a/Tutorials/1-2VariableSplitting.md b/Tutorials/1-2VariableSplitting.md new file mode 100644 index 0000000..888a4f9 --- /dev/null +++ b/Tutorials/1-2VariableSplitting.md @@ -0,0 +1,47 @@ +# VariableSplitting + +Write a string (This can be any combination of letters). + +```python +var +``` + +Then add a space and an equal sign. + +```python +var = +``` + +If you want an integer, add a space and put a number. + +```python +var = 123456789 +``` +If you want the integer go up by a number, add a plus before the equals. +```python +Hello += 1 +``` +If you want a string, put the string in between a pair of quotation marks. + +```python +Hello = "Variable" +``` + +Next, put brackets + +```python +Hello[] +``` + +Put a number inside the brackets + +```python +Hello[2] +``` + +## Examples + +### Example 1: +```python +Hello[2] +``` From dc5af0738fcb1b7f56a0d37f7761d1e4314bcbdd Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 20 Nov 2018 15:11:50 -0500 Subject: [PATCH 191/206] Delete 1-1Variables.md --- Tutorials/1-1Variables.md | 46 --------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 Tutorials/1-1Variables.md diff --git a/Tutorials/1-1Variables.md b/Tutorials/1-1Variables.md deleted file mode 100644 index af61313..0000000 --- a/Tutorials/1-1Variables.md +++ /dev/null @@ -1,46 +0,0 @@ -# Variables - -Write a string (This can be any combination of letters). - -```python -Hello -``` - -Then add a space and an equal sign. - -```python -Hello = -``` - -If you want an integer, add a space and put a number. - -```python -Hello = 1 -``` -If you want the integer go up by a number, add a plus before the equals. -```python -Hello += 1 -``` -If you want a string, put the string in between a pair of quotation marks. - -```python -Hello = "Variable" -``` - -## Examples - -### Example 1: -```python -dollars = 100 -``` - -### Example 2: -```python -dollars = "none" -``` - -### Example 3: -```python -dollars = 1 -dollars += 1 -``` From b9422f461ec527c6d8a4e6560241aea02bec31ed Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 20 Nov 2018 15:12:00 -0500 Subject: [PATCH 192/206] Delete 1-2VariableSplitting.md --- Tutorials/1-2VariableSplitting.md | 47 ------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 Tutorials/1-2VariableSplitting.md diff --git a/Tutorials/1-2VariableSplitting.md b/Tutorials/1-2VariableSplitting.md deleted file mode 100644 index 888a4f9..0000000 --- a/Tutorials/1-2VariableSplitting.md +++ /dev/null @@ -1,47 +0,0 @@ -# VariableSplitting - -Write a string (This can be any combination of letters). - -```python -var -``` - -Then add a space and an equal sign. - -```python -var = -``` - -If you want an integer, add a space and put a number. - -```python -var = 123456789 -``` -If you want the integer go up by a number, add a plus before the equals. -```python -Hello += 1 -``` -If you want a string, put the string in between a pair of quotation marks. - -```python -Hello = "Variable" -``` - -Next, put brackets - -```python -Hello[] -``` - -Put a number inside the brackets - -```python -Hello[2] -``` - -## Examples - -### Example 1: -```python -Hello[2] -``` From f3783e0d622e045a04a588c8500d923cfe1a99bf Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 20 Nov 2018 15:12:08 -0500 Subject: [PATCH 193/206] Delete 2-1Print.md --- Tutorials/2-1Print.md | 73 ------------------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 Tutorials/2-1Print.md diff --git a/Tutorials/2-1Print.md b/Tutorials/2-1Print.md deleted file mode 100644 index cd30b28..0000000 --- a/Tutorials/2-1Print.md +++ /dev/null @@ -1,73 +0,0 @@ -# Print - -Write "print". - -```python -print -``` - -After that, add a pair of parentheses. - -```python -print() -``` - -If you want it to print a variable, type the variable inside the parentheses. - -```python -print() -``` - -If you want it to print a string, put a pair of quotation marks and inbetween that, add a string. - -```python -print("") -``` - -If you want to print text and then a variable, add quotation marks and add a comma and a variable. - -```python -print("Variable =",Variable) -``` - -## Examples - -### Example 1: -```python -var = 1 -print(var) -``` -Run: -``` -1 -``` - -### Example 2: -```python -var = "Surprise" -print(var) -``` -Run: -``` -Surprise -``` - -### Example 3: -```python -var = 1 -print("Var equals",var) -``` -Run: -``` -Var equals 1 -``` - -### Example 4: -```python -var = "Surprise" -print("Var equals",var) -``` -Run: -``` -Var equals Surprise -``` From 360d9e0fcaee74dda1f9b82728faff390e51753e Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 20 Nov 2018 15:12:18 -0500 Subject: [PATCH 194/206] Delete 3-1If.md --- Tutorials/3-1If.md | 98 ---------------------------------------------- 1 file changed, 98 deletions(-) delete mode 100644 Tutorials/3-1If.md diff --git a/Tutorials/3-1If.md b/Tutorials/3-1If.md deleted file mode 100644 index 64029d2..0000000 --- a/Tutorials/3-1If.md +++ /dev/null @@ -1,98 +0,0 @@ -# If - -Write "if". - -```python -if -``` - -Next, add a space and a variable. - -```python -if apples -``` - -After that, add two equal signs. - -```python -if apples == -``` - -If you want it equal to a integer, add a space and the integer. If you want it less than or equal to, add the appropriate signs. After that, put a colon. If you want to view the variable tutorial, click [here](https://github.com/codingtutorials/Python/blob/master/Tutorials/Variables.md) - -```python -if apples == 1: -``` - -If you want it equal to a string, add a pair of parenthesis and inside it, put a string. After that, put a colon. - -```python -if apples == "alot": -``` - -Next, press enter and press tab. After that, put any code. In this case, I will put a print line. If you want to view the printing tutorial, click [here](https://github.com/codingtutorials/Python/blob/master/Tutorials/Print.md) - -```python -if apples == "alot": - print("You have",apples,"apples") -``` - - -## Examples - -### Example 1: -```python -apples = 1 -if apples == 1: - print("You have",apples,"apples") -``` -Run: -``` -You have 1 apples -``` - -### Example 2: -```python -apples = "alot" -if apples == "alot": - print("You have",apples,"apples") -``` -Run: -``` -You have alot apples -``` - - -### Example 3: -```python -apples = 1 -if apples == 1: - print("You have",apples,"apples") -apples = 2 -if apples == 2: - print("You have",apples,"apples") -``` -Run: -``` -You have 1 apples -You have 2 apples -``` - -## Example 4: -```python -apples = 1 -if apples == 1: - print("You have",apples,"apples") - apples = 2 -if apples == 2: - print("You have",apples,"apples") - apples += 1 -if apples == 3: - print("You have",apples,"apples") -``` -Run: -``` -You have 1 apples -You have 2 apples -You have 3 apples -``` From 9107440a67044eb591a0daf004d73ab8b16b7a17 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 20 Nov 2018 15:12:29 -0500 Subject: [PATCH 195/206] Delete 3-2Elif.md --- Tutorials/3-2Elif.md | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 Tutorials/3-2Elif.md diff --git a/Tutorials/3-2Elif.md b/Tutorials/3-2Elif.md deleted file mode 100644 index 1518519..0000000 --- a/Tutorials/3-2Elif.md +++ /dev/null @@ -1,17 +0,0 @@ -# Elif - -> When you use a elif program, it tells the computer to do B instead of A if A is false - -Write a if statement - -```python -if a == "b": -``` - -Add "el" before the "if" - -```python -elif a == "b": -``` - -It has the same format as the if function, so look at that tutorial for a more in depth explanation. From 46f10bf50e4e7207ceaa03b36670f61ed5631a62 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 20 Nov 2018 15:12:36 -0500 Subject: [PATCH 196/206] Delete 3-3Else.md --- Tutorials/3-3Else.md | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 Tutorials/3-3Else.md diff --git a/Tutorials/3-3Else.md b/Tutorials/3-3Else.md deleted file mode 100644 index ec2770c..0000000 --- a/Tutorials/3-3Else.md +++ /dev/null @@ -1,36 +0,0 @@ -# Else -> This function checks if no if statements are true -Write "elif" - -```python -elif -``` - -Add a colon after "elif" - -```python -elif: -``` - -Put any code in a new line - -```python -elif: - print("Hello") -``` - - -## Examples - -### Example 1: -```python -money = 1 -if money == 1: - print("You have",money,"money") -else: - print("You dont have $1") -``` -Run: -``` -You have 1 money -``` From 7179e77973f5fe9e934548376a352c3d40bf25c1 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 20 Nov 2018 15:12:44 -0500 Subject: [PATCH 197/206] Delete 4-1Input.md --- Tutorials/4-1Input.md | 61 ------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 Tutorials/4-1Input.md diff --git a/Tutorials/4-1Input.md b/Tutorials/4-1Input.md deleted file mode 100644 index 877b35a..0000000 --- a/Tutorials/4-1Input.md +++ /dev/null @@ -1,61 +0,0 @@ -# Input - -Write "input". - -```python -input -``` - -Add a pair of parenthesis - -```python -input() -``` - -If you want there to be text before the input, put a variable or a pair of quotation marks and text - -```python -input("Yes/No:") -``` - - -## Examples - -### Example 1: -```python -input("Do you want an apple? [Y|N]") -``` -Run: -``` -Do you want an apple? [Y|N]: -``` - -### Example 2: -```python -name = "Bob" -input("Is " + name + " your name?") -``` -Run: -``` -Is Bob your name? -``` - - -### Example 3: -```python -name = input("What is your name?") -print("Hello, " + name + "!") -if name == Bob: - print("Have a great day, Bob!") -``` -Run: -``` -What is your name? [Bob] -Hello, Bob! -Have a great day, Bob! -``` -Run 2: -``` -What is your name? [Joe] -Hello, Joe -``` From 6e1b493aea264695c711dff5d3db2e336cce2ffb Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 20 Nov 2018 15:12:51 -0500 Subject: [PATCH 198/206] Delete 4-2AdvancedPrintFunctions.md --- Tutorials/4-2AdvancedPrintFunctions.md | 48 -------------------------- 1 file changed, 48 deletions(-) delete mode 100644 Tutorials/4-2AdvancedPrintFunctions.md diff --git a/Tutorials/4-2AdvancedPrintFunctions.md b/Tutorials/4-2AdvancedPrintFunctions.md deleted file mode 100644 index 312ac0b..0000000 --- a/Tutorials/4-2AdvancedPrintFunctions.md +++ /dev/null @@ -1,48 +0,0 @@ -# Advanced Print Functions - -## Requirements - -> Tips & Tricks: Use a + sign to combine strings and variables together (without spaces) -Input: -```python -Bob -``` - -Output: -```python -Hello, Bob! -``` -## Solution - -Type the print function -```python -print() -``` -Add a pair of quotation marks -```python -print("") -``` -Type "Hello, " in the quotation marks -```python -print("Hello, ") -``` -Add a plus sign to combine the strings -```python -print("Hello, " + ) -``` -Add a input function -```python -print("Hello, " + input()) -``` -Add another + sign -```python -print("Hello, " + input() + ) -``` -Add a pair of quotation marks -```python -print("Hello, " + input() + "") -``` -Add an exclamation mark inside the pair of quotation mark -```python -print("Hello, " + input() + "!") -``` From 9a561fc6223ac337813ae1a843160069811f7602 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 19 Jan 2019 20:11:32 -0500 Subject: [PATCH 199/206] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 591a926..efe2b23 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,5 @@ If you want to edit tutorials, go on the Discord server and ask. * [Python](https://www.python.org) * [PyCharm](https://www.jetbrains.com/pycharm/) * [Repl.it](https://repl.it/languages/python3) - * [Trinket](https://trinket.io) ## Contact [Discord](https://discord.gg/AX8rCaa) From 8ea6964525c97dc23255c1db94ae01ee53aec0f9 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 19 Jan 2019 20:12:24 -0500 Subject: [PATCH 200/206] Delete Computer.py --- Projects/Computer.py | 84 -------------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 Projects/Computer.py diff --git a/Projects/Computer.py b/Projects/Computer.py deleted file mode 100644 index bdf1ea5..0000000 --- a/Projects/Computer.py +++ /dev/null @@ -1,84 +0,0 @@ -from time import sleep - -Username = "" -Password = "" -attempts = 0 - -while Username != "USER" or Password != "PASS": - if attempts >0: - print ("Wrong username or password") - attempts += 1 - print("What's Username?") - Username = input() - print("Whats Password?") - Password = input() - -if Username == "USER" and Password == "PASS": - print("Starting Computer") - sleep(1.0) - print("Loading...") - sleep(1.0) - Computer = 1 - Computer_help = 0 - while Computer == 1: - print("Loading...") - Computer_help += 1 - sleep(1.0) - if Computer_help == 4: - Computer = 2 - while Computer == 2: - print("Enter Internet") - inp = input() - if inp == "Internet": - Internet_help = 1 - Computer = 3 - Searchingin = 0 - while Searchingin == 0: - if Computer == 3: - if inp == "Internet": - print("What do you want to search for?") - Searching = input() - print("Searching for : "+Searching) - if Searching == "Google": - sleep(1.0) - print("Going to Google") - Searchingin = 0 - elif Searching == "List": - sleep(1.0) - print("Google, Minecraft, Gmail, Shut Down") - Searchingin = 0 - elif Searching == "Shut Down": - sleep(1.0) - print("Shutting Down") - Searchingin = 1 - elif Searching == "Minecraft": - sleep(1.0) - print("Opening Minecraft") - Searchingin = 0 - elif Searching == "Gmail": - sleep(1.0) - print("Opening gmail") - gmail = 1 - Searchingin = 0 - if gmail == 1: - sleep(1.0) - print("Enter Send or check") - gmail = input() - if gmail == "Send": - print("What's email?") - whatsemail = input() - print("What's name?") - whatsname = input() - print("What's message") - whatsmessage = input() - print ("Sending to:",whatsemail,"Name is:",whatsname,"Message:",whatsmessage) - else: - sleep(1.0) - print("No results found, click enter to try again") - Searchinginput = input() - if Searchingin == "No results found, click enter to try again": - Searchingin = 0 - while Searchingin == 1: - print("Shutting Down") - Searchingin = 0 - From 6f41c110fb0f8a13785eaee84a597cf238b8137d Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 19 Jan 2019 20:12:39 -0500 Subject: [PATCH 201/206] Delete PythonPuterBeta.py --- Projects/PythonPuterBeta.py | 38 ------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 Projects/PythonPuterBeta.py diff --git a/Projects/PythonPuterBeta.py b/Projects/PythonPuterBeta.py deleted file mode 100644 index 686a1f7..0000000 --- a/Projects/PythonPuterBeta.py +++ /dev/null @@ -1,38 +0,0 @@ -from time import sleep -import sys -import random -hi = "0" -# Start Computer - -print("Do you want to start the computer?") -startcomputer = input("[y]/[n]:") -if startcomputer == "y": - text = "Loading ..........." - for character in text: - sys.stdout.write(character) - sleep(0.2) - login = 1 -if startcomputer == "n": - print("Shutting Down") -# Login -if login == 1: - print("\n" * 1) - print("Starting Computer") - Username = input("Username: ") - Password = input("Password: ") - -# Login Check -attempts = 1 -while Username != "ADMIN" or Password !="ADMIN": - if attempts <3: - print("Wrong Username or Password") - attempts += 1 - Username = input("Username:") - Password = input("Password:") - else: - if hi == "0": - print("Allowed attempts exceeded") - hi = hi + "1" - quit() - - From 00b712d50f0b386e068e9389143edd4866838f46 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Sat, 19 Jan 2019 20:12:47 -0500 Subject: [PATCH 202/206] Delete cmd.py --- Projects/cmd.py | 54 ------------------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 Projects/cmd.py diff --git a/Projects/cmd.py b/Projects/cmd.py deleted file mode 100644 index 877910b..0000000 --- a/Projects/cmd.py +++ /dev/null @@ -1,54 +0,0 @@ -import time -import random -import os -def passgen(): - print("How many passwords do you want?") - passgenamount = int(input("Passwords:")) - for x in range(passgenamount): - print (random.randint(10000000,100000000)) - - -print("Please Authenticate Yourself.") -time.sleep(3) -print("Please log in.") -time.sleep(2) -while True: - - USER = input("Username") - PASS = input("Password") - if USER == "admin": - if PASS == "admin": - while True: - print("Welcome to the command line emulator.") - print("Type in [help1] for more options") - while True: - command = input("admin@pyputer $ ") - if command == "help1": - print(""" - -Help page #1 - [help1] displays this page - - [passgen] generates secure 8 digit passwords - - [man {app}] shows manual for app - - [help2] next page""") - - if command == "pass-gen": - passgen() - - if command == "man pass-gen": - print("""Manual page for Passgen - passgen is a free open-source application included in the pyputer operating system. It generates a random password that is 8 digit long and secure. To use it, type in pass-gen and the file will execute.""") - - - - - - - else: - print("-bash:", command, "is not a command") - - else: - print("Authentication Failed. Please try again.") From 523df2dc15761fbffa9972c014c5dbbb3809d0af Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 1 Oct 2019 14:25:24 -0400 Subject: [PATCH 203/206] Added InteliJ IDEA --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index efe2b23..78191a8 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # Python ## Helping -If you want to edit tutorials, go on the Discord server and ask. +If you want to edit tutorials, go to the Discord server and ask. ## Compilers * [Python](https://www.python.org) * [PyCharm](https://www.jetbrains.com/pycharm/) + * [InteliJ IDEA](https://www.jetbrains.com/idea/) * [Repl.it](https://repl.it/languages/python3) ## Contact [Discord](https://discord.gg/AX8rCaa) From 89d0bdea91b303457fc50e43a4741d091dd4350f Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 1 Oct 2019 14:45:56 -0400 Subject: [PATCH 204/206] Created tutorial file, group folder, and added content --- Tutorials/Strings.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Tutorials/Strings.py diff --git a/Tutorials/Strings.py b/Tutorials/Strings.py new file mode 100644 index 0000000..3f988ad --- /dev/null +++ b/Tutorials/Strings.py @@ -0,0 +1,4 @@ +# Strings reference guide / tutorial for Python + +# Print welcome message +print("Hello World") From 86fb7441042a38ee14f97dea035d39e76bf47975 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 1 Oct 2019 14:51:21 -0400 Subject: [PATCH 205/206] Updated Python string tutorial documentation --- Tutorials/Strings.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Tutorials/Strings.py b/Tutorials/Strings.py index 3f988ad..70198c9 100644 --- a/Tutorials/Strings.py +++ b/Tutorials/Strings.py @@ -2,3 +2,17 @@ # Print welcome message print("Hello World") + +# Strings can either be surrounded in " or ' +print('Hello World') + +# You can use variables to store strings, then print them out +message = "Hello World" +print(message) + +# If you want to put single quotes in a single quote string or double quotes in a double quote string, you need to change the string's quote type +# Invalid: 'hello's world' +message = "hello's world" # Correct + +# Invalid: "he said "welcome!"" +message = 'he said "welcome!"' # Correct From 8dc6969d29219976a8bd39bf42b6f054115d4d33 Mon Sep 17 00:00:00 2001 From: Nathan R Date: Tue, 1 Oct 2019 14:55:38 -0400 Subject: [PATCH 206/206] Added more examples and added a place for functions --- Tutorials/Strings.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Tutorials/Strings.py b/Tutorials/Strings.py index 70198c9..e84e684 100644 --- a/Tutorials/Strings.py +++ b/Tutorials/Strings.py @@ -16,3 +16,21 @@ # Invalid: "he said "welcome!"" message = 'he said "welcome!"' # Correct + +# You can also use the backslash character to ignore quotes +message = 'mary\'s ice cream' +message = "she exclaimed \"good\" morning" + +# Use three double quotes for a multiline string +message = """ hello +line1 +line2 +line3 +... +""" +print(message) + +# Different avaliable functions for strings + +# | Length | +a = len("hello") # a = 5