-3

hae....my program keeps showing name 'raw_input' is not defined whenever i use a raw_input.

i.e

input1 = raw_input('Enter your number ')

then the error name 'raw_input' is not defined pops up...please help fix this. thnks

khelwood
  • 55,782
  • 14
  • 81
  • 108
caleb
  • 1
  • 1
  • 1
  • Try using `input('Enter your number ')` instead – MurrayW Sep 18 '19 at 08:57
  • Welcome to SO. You may want to read [ask], paying attention to the very first advice : "search". Just typing "raw_input is not defined" in the search bar (or in google FWIW) would have solved your issue. – bruno desthuilliers Sep 18 '19 at 09:01

2 Answers2

0

Use input('Enter your number ') instead.

raw_input() is Python 2.x syntax.

MurrayW
  • 393
  • 2
  • 10
0

raw_input() was renamed to input()

From What’s New In Python 3.0.