-1

Is there any way of getting string input from user, other than raw-input, as that generates an error in my python program?

choice = raw_input("Do you want to convert from celcius to farenheit?")
NameError: name 'raw_input' is not defined
gnat
  • 6,213
  • 108
  • 53
  • 73
ayushi
  • 15
  • 3

1 Answers1

0

raw_input is not working because you are using Python 3. If you want raw_input, try downgrading to use Python 2 instead.

Alternatively, if you must use Python 3, you can use the function input like so:

name = input("Enter your name: ")
Sabrina Jewson
  • 1,478
  • 1
  • 10
  • 17