A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

anonymous

  • 5 years ago

Hi all...I am using python 3.2 ...there is an error when i type raw_input it says not defined...anyone have a clue??? thanks

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

    maybe your variable is not defined...

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

    >>> x = raw_input (" enter youe first name ") Traceback (most recent call last): File "<pyshell#29>", line 1, in <module> x = raw_input (" enter youe first name ") NameError: name 'raw_input' is not defined

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

    you must declare your variable first, maybe x as string

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

    >>> "x" = raw_input ("enter your first name " ) SyntaxError: can't assign to literal how to do that please.

  5. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    In python3.2 you can simply write x=input('Enter your first name\n') and if you need integers, y=int(input('Your age\n'))

  6. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Yes it worked...thanks a lot

  7. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    If you are going to use 3.x instead of 2.x as the course instructions stipulated you should be prepared to figure out the differences between 3.x and 2.x ... 3.x is NOT backward compatible

  8. 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

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.