Hello,I get through these the wrong way.I still do not understand the flow,syntax, etc. inherently(logic is fine)and I get the code from too much trial/error,suggestions,reference but do not understand it well enough even when it works out.http://codepad.org/nPGKNXR9
For GHOST function I tried to put sys.exit() under YOU LOSE and it did do anything.
How do I get the game to restart or rather allow a new prompt to enter a new letter after the final 'else' loop?
Final line 'play = was from someone else.I know it works but I do not understand it really.Thank you
MIT 6.00 Intro Computer Science (OCW)
Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
Sorry,ran out of room. PS5 Problem 6. Also,anywhere to work on this with someone else?Even a tutor, maybe.I could post so many questions. I know all the helpers are great and patient but this would be too much in this forum.
is this what you had in mind??
I guess,I don't know much.I played with breaks before,did not work as I wanted(never do).Then I saw sys.exit.Why won't that work?And while I see the difference in your code,I do not understand why it is proper(I know it is).You go into that while loop to check input.So,when input is 1 letter it exits and goes to fragment.append?Thanks,sorry I am thick and slow.
Not the answer you are looking for? Search for more explanations.
u are correct, it will keep asking for an input from the user till it gets the correct input - which is what i thought you were looking for.
The tutorial in the documentation is a good reference
break will break out of the while loop or for loop that contains it.
sys.exit - "Exit from Python"
Have done all the reading,obviously,not soaked in.So if sys.exit were in place of break(or near that),should this not just exit the program?
apparently it does
Oh, I believe what is written when I read it and realize that when it fails it is ME.Thank you very much for your help.I am posting another question and it is a doozy.I really would rather do this with a peer or tutor simultaneously just to speed up everything.Plus would feel better about using others' time.