-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
  • 963,270
  • 265
  • 3,804
  • 3,187
munchschair
  • 1,503
  • 2
  • 19
  • 41

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
  • 32,670
  • 6
  • 50
  • 72