Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

samoos

  • 3 years ago

I'm working on the rock, paper, scissors game (hw_1, ex 1.7) and I've written some code which I think should work, just using basic if / elif / else blocks. Once I have got it to work I will write something more elegant (or at least shorter) but I'm not able to run the module. I get the following error: "EOL while scanning string literal" and the (empty) line at the end of my code is highlighted. Can anybody tell me what the error means and what is missing in my code? http://pastebin.com/jFWWtUSv

  • This Question is Closed
  1. Zafix
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    try change at the end ” with " print "This is not a valid object selection” with print "This is not a valid object selection"

  2. samoos
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    what does "with" do? I tried changing print "This is not a valid object selection" to with print "This is not a valid object selection" But it still doesn't work unfortunately, it highlights the word 'print' and says there is a syntax error.

  3. Zafix
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    change---> print "This is not a valid object selection” with --> print "This is not a valid object selection" you have wrong character at the and of line (”) instead of (")

  4. samoos
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    ok! great, thanks!

  5. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy