Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

samoos

  • 2 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
    • 2 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
    • 2 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
    • 2 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
    • 2 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.

    Search OpenStudy
    • Attachments:

Ask your own question

Ask a Question
Find more explanations on OpenStudy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.