-1

I am new to Python and I am using python 3. I have an if statement which is recieving an error, but I do not know why. It's the line that says print new_word after the second if statement that is receiving the error. I indented it.

pyg = 'ay'

original = raw_input('Enter a word:')
word = original.lower()
first = word[0]
new_word = word[1:] + first + pyg

if len(original) > 0 and original.isalpha():
    if first == "o" or first == "i" or first == "e" or first == "u":
        print new_word
    else: print new_word
else:
    print word
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
munchschair
  • 1,593
  • 3
  • 19
  • 43

1 Answers1

1

In Python 3.x, print is a function, so you must call it as:

print("Some string here")

Also, in Python 3.x you should use input(...) instead of raw_input(...)

Christian Tapia
  • 33,620
  • 7
  • 56
  • 73