From bfc88d27ba78a47cdc905cfa21c29dacd5417c77 Mon Sep 17 00:00:00 2001 From: giggzze Date: Fri, 9 Oct 2020 09:56:32 +0100 Subject: [PATCH] giggs choice fixed --- StoryD7.py | 22 ++++++++++++++-------- __pycache__/story.cpython-38.pyc | Bin 6057 -> 6301 bytes 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/StoryD7.py b/StoryD7.py index 078c3f4..4a2e018 100644 --- a/StoryD7.py +++ b/StoryD7.py @@ -78,7 +78,7 @@ def dansStory(): Ans6 = input("Are you going to 'risk your life to save your brother', or 'stay where you are and keep holding onto safety'") print("") print("After the decision...") -dansStory() +#dansStory() # gigs starts @@ -105,13 +105,19 @@ def main(): print(story.sept) else: pass - clear() - print(story.decision) - a = int(input('Please select 1 or 2...')) - if a == 1: - print(story.leave) - elif a == 2: - print(story.back) + isNumber = False + while isNumber == False: + try: + clear() + print(story.decision) + a = int(input('Please select 1 or 2...')) + if a == 1: + print(story.leave) + elif a == 2: + print(story.back) + isNumber = True + except ValueError: + pass print(story.decision2) print(story.con) main() diff --git a/__pycache__/story.cpython-38.pyc b/__pycache__/story.cpython-38.pyc index e42dddf904b11bc32df8715c0ea811bd3b49d588..7bff86dfeccbc10cd8336366e405dd197a697e7f 100644 GIT binary patch delta 407 zcmZWl!Ab)$5Z%(X+LVH*AbOgclnPRBp0uraRAgI(g6K9o>xS+olFeG{rQaa+;=vE- zQT>}-z4{3~IMpr`e2`@3y~(^urU!40dbe6-4&mc$eAC=@oUeJZi~=Pmw9@_O`W_3) zy>h@jr&f8tooy6eKd(1miXklU^v&`xKZh!d0~o0cVlhB43PK?RP?-T=juNF2gbbBV zd?SQK}QRXfHtvN3egpT$fF#b0OC%tiG zBDe^_!+V2CA2nS+CBChs5i&!#5>znn-j0;uxYXpl#w_EJ-xJz1N{?(Q{T;wEL#BV8 y)=jCgT?>$llpbTtd30#qzRw4CB}N*~7CDKlv>ALfQ%6_mdv#@Ux!o<6-1Q&#J9Z=h delta 188 zcmbPhxKdv`l$V!_0SI#B%Hr)L85kaeILLqr$Z-JTVuOj=>U^o3scg-Rj0`E9!3>&Q z8)N