diff --git a/InteractiveStoryPythonConversionProject/.vs/InteractiveStoryPythonConversionProject/v16/.suo b/InteractiveStoryPythonConversionProject/.vs/InteractiveStoryPythonConversionProject/v16/.suo index a689231..cd13022 100644 Binary files a/InteractiveStoryPythonConversionProject/.vs/InteractiveStoryPythonConversionProject/v16/.suo and b/InteractiveStoryPythonConversionProject/.vs/InteractiveStoryPythonConversionProject/v16/.suo differ diff --git a/InteractiveStoryPythonConversionProject/InteractiveStoryPythonConversionProject.py b/InteractiveStoryPythonConversionProject/InteractiveStoryPythonConversionProject.py index 1b2874c..0366449 100644 --- a/InteractiveStoryPythonConversionProject/InteractiveStoryPythonConversionProject.py +++ b/InteractiveStoryPythonConversionProject/InteractiveStoryPythonConversionProject.py @@ -126,11 +126,6 @@ route={0:[0, 1], 60:[1],} - - - - - y = 0 x = 0 #the position of the list "y" inside "route" moduleProgressList = [] @@ -186,4 +181,3 @@ while True: x = input("Your choice is...") if x == "n" or "N": break # breaks the while true loop if players dont want to restart - diff --git a/InteractiveStoryPythonConversionProject/__pycache__/dictionary.cpython-37.pyc b/InteractiveStoryPythonConversionProject/__pycache__/dictionary.cpython-37.pyc new file mode 100644 index 0000000..e69126b Binary files /dev/null and b/InteractiveStoryPythonConversionProject/__pycache__/dictionary.cpython-37.pyc differ diff --git a/alternative 2.py b/alternative 2.py deleted file mode 100644 index 398c291..0000000 --- a/alternative 2.py +++ /dev/null @@ -1,129 +0,0 @@ -""" - -sphinx story -is good - -https://github.coventry.ac.uk/lycette2/CuriosityKilledTheSphinx - -""" - -history = [] # empty storage area for choices - - -def getAnswer1(question, text): # function to handle 1 response from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - - -def getAnswer2(question, text): # function to handle 2 responses from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\nB = " + text["B"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - elif choice == "b" or choice == "B": - print("You have selected B: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - - -def getAnswer3(question, text): # function to handle 3 responses from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\nB = " + text["B"] + - "\nC = " + text["C"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - elif choice == "b" or choice == "B": - print("You have selected B: " + text[choice.upper()]) - loop = False - elif choice == "c" or choice == "C": - print("You have selected C: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - - -def getAnswer4(question, text): # function to handle 4 responses from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\nB = " + text["B"] + - "\nC = " + text["C"] + - "\nC = " + text["D"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - elif choice == "b" or choice == "B": - print("You have selected B: " + text[choice.upper()]) - loop = False - elif choice == "c" or choice == "C": - print("You have selected C: " + text[choice.upper()]) - loop = False - elif choice == "d" or choice == "D": - print("You have selected D: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - -end = False - -history = ["A","B","D"] -test = 0 - -while end == False: - - if history[0] == "A" and len(history) == 1: - print("This is passage A, and should never run.") - elif history[0] == "B" and len(history) == 2: - print("This is passage B, length 2, and will run once then stop.") - end = True - elif history[0] == "A" and len(history) == 3: - print("This should loop 5 times") - test = test + 1 - if test == 5: - history = ["B","A"] - print("history changed to:", history) diff --git a/alternative 3.py b/alternative 3.py deleted file mode 100644 index 4c13f1a..0000000 --- a/alternative 3.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - -sphinx story -is good - -https://github.coventry.ac.uk/lycette2/CuriosityKilledTheSphinx - -""" - -history = [] # empty storage area for choices - - -def getAnswer1(question, text): # function to handle 1 response from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - - -def getAnswer2(question, text): # function to handle 2 responses from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\nB = " + text["B"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - elif choice == "b" or choice == "B": - print("You have selected B: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - - -def getAnswer3(question, text): # function to handle 3 responses from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\nB = " + text["B"] + - "\nC = " + text["C"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - elif choice == "b" or choice == "B": - print("You have selected B: " + text[choice.upper()]) - loop = False - elif choice == "c" or choice == "C": - print("You have selected C: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - - -def getAnswer4(question, text): # function to handle 4 responses from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\nB = " + text["B"] + - "\nC = " + text["C"] + - "\nC = " + text["D"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - elif choice == "b" or choice == "B": - print("You have selected B: " + text[choice.upper()]) - loop = False - elif choice == "c" or choice == "C": - print("You have selected C: " + text[choice.upper()]) - loop = False - elif choice == "d" or choice == "D": - print("You have selected D: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - -end = False - -test = 0 - -""" - -sphinx story -is good - -https://github.coventry.ac.uk/lycette2/CuriosityKilledTheSphinx - -""" - -history = [] # empty storage area for choices - - -def getAnswer1(question, text): # function to handle 1 response from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - - -def getAnswer2(question, text): # function to handle 2 responses from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\nB = " + text["B"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - elif choice == "b" or choice == "B": - print("You have selected B: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - - -def getAnswer3(question, text): # function to handle 3 responses from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\nB = " + text["B"] + - "\nC = " + text["C"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - elif choice == "b" or choice == "B": - print("You have selected B: " + text[choice.upper()]) - loop = False - elif choice == "c" or choice == "C": - print("You have selected C: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - - -def getAnswer4(question, text): # function to handle 4 responses from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\nB = " + text["B"] + - "\nC = " + text["C"] + - "\nD = " + text["D"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - elif choice == "b" or choice == "B": - print("You have selected B: " + text[choice.upper()]) - loop = False - elif choice == "c" or choice == "C": - print("You have selected C: " + text[choice.upper()]) - loop = False - elif choice == "d" or choice == "D": - print("You have selected D: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - -def start(): - question = "You are reading a magazine. The phone rings." - text = {"A": "Continue reading the magazine", - "B": "Inspect the room", - "C": "You pick up the phone" - } - getAnswer3(question, text) - -end = False -while end == False: - - if len(history) == 0: # runs at the start, or when the story needs resetting. - start() - - if history[0] == "A" and len(history) == 1: # - question = "You continue Archaeologist's Digest and read about how there's been a new discovery in Giza. How interesting.\nYou can't read much further because the phone is still ringing. Loudly. " - text = {"A": "Answer"} - getAnswer1(question, text) - elif history[0] == "B" and len(history) ==1: - question = "You're in your office. Large shelves are stacked from end to end.From ancient Latin and Hebrew to Greek and Hieroglyphics.\nPictures from previous expeditions are framed on the wall." - text = {"A": "Inspect images", - "B": "Inspect books", - "C": "Back to the magazine" - } - getAnswer3(question, text) - elif history[0] == "C" and len(history) == 1: - question = "Ethan Stewart speaking, an interesting and rather weird door has been dug up.\nNo amount of force has worked on the door and I thought I'd contact you as the leading expert in hieroglyphs.\nI want you to fly over to Giza immediately and inspect the door." - text = {"A": "…", - "B": "Is it urgent? And who are you anyway?", - "C": "Don’t tell me what to do!", - "D": "I’ll be on my way." - } - getAnswer4(question, text) - - if history[1] == "A" and len(history) == 2: - print("You answer the phone...") - history = [] # example for testing purposes. resets the story. \ No newline at end of file diff --git a/alternative.py b/alternative.py deleted file mode 100644 index 9cc6542..0000000 --- a/alternative.py +++ /dev/null @@ -1,172 +0,0 @@ -""" - -sphinx story -is good - -https://github.coventry.ac.uk/lycette2/CuriosityKilledTheSphinx - -""" - -history = [] # empty storage area for choices - - -def start(): # super unnecessary and can be removed - loop = True - difficulty = "" - - while loop == True: - - difficulty = input("Enter Difficulty:\nA = EASY\nB = MEDIUM\nC = HARD\n->") - if difficulty == "a" or difficulty == "A": - print("You have selected EASY") - loop = False - elif difficulty == "b" or difficulty == "B": - print("You have selected MEDIUM") - loop = False - elif difficulty == "c" or difficulty == "C": - print("You have selected HARD") - loop = False - else: - print("Please enter a valid option.") - - history.append(difficulty.upper()) - - -def getAnswer1(question, text): # function to handle 1 response from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - - -def getAnswer2(question, text): # function to handle 2 responses from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\nB = " + text["B"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - elif choice == "b" or choice == "B": - print("You have selected B: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - - -def getAnswer3(question, text): # function to handle 3 responses from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\nB = " + text["B"] + - "\nC = " + text["C"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - elif choice == "b" or choice == "B": - print("You have selected B: " + text[choice.upper()]) - loop = False - elif choice == "c" or choice == "C": - print("You have selected C: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - - -def getAnswer4(question, text): # function to handle 4 responses from the user - loop = True - choice = "" - - while loop == True: - print(question) - choice = input("Enter choice:" - "\nA = " + text["A"] + - "\nB = " + text["B"] + - "\nC = " + text["C"] + - "\nC = " + text["D"] + - "\n->") - - if choice == "a" or choice == "A": - print("You have selected A: " + text[choice.upper()]) - loop = False - elif choice == "b" or choice == "B": - print("You have selected B: " + text[choice.upper()]) - loop = False - elif choice == "c" or choice == "C": - print("You have selected C: " + text[choice.upper()]) - loop = False - elif choice == "d" or choice == "D": - print("You have selected D: " + text[choice.upper()]) - loop = False - else: - print("Please enter a valid option.") # runs if the answer is not valid - - history.append(choice.upper()) # adds the choice the user picked - - -# Main block -start() - - -question = "You are reading a magazine. The phone rings." -text = {"A": "Continue reading the magazine", - "B": "Inspect the room", - "C": "You pick up the phone" - } - -getAnswer3(question, text) - -print(history) # prints the history of choices made by the user, not really needed. - -if history[1] == "A": - question = "You continue Archaeologist's Digest and read about how there's been a new discovery in Giza. How interesting.\nYou can't read much further because the phone is still ringing. Loudly. " - text = {"A": "Answer"} - getAnswer1(question, text) - print(history) -elif history[1] == "B": - question = "You're in your office. Large shelves are stacked from end to end.From ancient Latin and Hebrew to Greek and Hieroglyphics.\nPictures from previous expeditions are framed on the wall." - text = {"A": "Inspect images", - "B": "Inspect books", - "C": "Back to the magazine" - } - getAnswer3(question, text) - print(history) - if history[2] == "C": - print("You go back to your magazine and realise MASUD HASN'T IMPLEMENTED THAT YET") # some sort of way to get back to the phone? do we store the data somewhere else? gg python i am confused -elif history[1] == "C": - question = "Ethan Stewart speaking, an interesting and rather weird door has been dug up.\nNo amount of force has worked on the door and I thought I'd contact you as the leading expert in hieroglyphs.\nI want you to fly over to Giza immediately and inspect the door." - text = {"A": "…", - "B": "Is it urgent? And who are you anyway?", - "C": "Don’t tell me what to do!", - "D": "I’ll be on my way." - } - getAnswer4(question, text) - print(history) \ No newline at end of file diff --git a/main.py b/main.py deleted file mode 100644 index 6da59ad..0000000 --- a/main.py +++ /dev/null @@ -1,61 +0,0 @@ -''' - -sphinx story -is good - -https://github.coventry.ac.uk/lycette2/CuriosityKilledTheSphinx - -choice = input("Enter choice:\nA = []\nB = []\nC = []\n->") - -''' - -history = [] - -def start(): - loop = True - - while loop == True: - - difficulty = input("Enter Difficulty:\nA = EASY\nB = MEDIUM\nC = HARD\n->") - if difficulty == "a" or difficulty == "A": - print("You have selected EASY") - loop = False - elif difficulty == "b" or difficulty == "B": - print("You have selected MEDIUM") - loop = False - elif difficulty == "c" or difficulty == "C": - print("You have selected HARD") - loop = False - else: - print("Please enter a valid option.") - - history.append(difficulty.upper()) - - -# Main block -start() - -loop = True -while loop == True: - - print("You are reading a magazine. The phone rings.") - choice = input("Enter choice:" - "\nA = [Continue reading the magazine]" - "\nB = [Inspect the room]" - "\nC = [You pick up the phone]" - "\n->") - if choice == "a" or choice == "A": - print("You have selected A") - loop = False - elif choice == "b" or choice == "B": - print("You have selected B") - loop = False - elif choice == "c" or choice == "C": - print("You have selected C") - loop = False - else: - print("Please enter a valid option.") - -history.append(choice) - -print(history) diff --git a/textgenerator.py b/textgenerator.py deleted file mode 100644 index e917442..0000000 --- a/textgenerator.py +++ /dev/null @@ -1,25 +0,0 @@ -optionsList = ["A", "B", "C", "D", "E", "F"] - -question = input("Paste the bit at the top: ") - -options = input("How many options? (max = 6)->") -line = "text = {" - -for i in range(1, int(options)+1): - if int(options) == 1: - textInput = input("Paste the text for option " + optionsList[i-1] + ":") - line = line + "\"" + optionsList[i-1] + "\": " + "\"" + textInput + "\"}" - elif i == 1: - textInput = input("Paste the text for option " + optionsList[i - 1] + ":") - line = line + "\"" + optionsList[i - 1] + "\": " + "\"" + textInput + "\",\n" - elif i < int(options): - textInput = input("Paste the text for option " + optionsList[i-1] + ":") - line = line + " \"" + optionsList[i-1] + "\": " + "\"" + textInput + "\",\n" - else: - textInput = input("Paste the text for option " + optionsList[i - 1] + ":") - line = line + " \"" + optionsList[i - 1] + "\": " + "\"" + textInput + "\"}" - -print("Paste this into code:\n") -print("question = \"" + question + "\"") -print(line) -print("getAnswer" + str(options) + str("(questions,text)"))