Break it down


#1



https://www.codecademy.com/courses/python-beginner-2W5v7/0/1?curriculum_id=4f89dab3d788890003000096


Traceback (most recent call last):
File "python", line 1, in
File "", line 1, in
NameError: name 'wowza' is not defined


What am i doing wrong?


word = input ("Enter a 5 letter word: ")
if len(word) == 5 :
    print str[1:4] + str[0] + "ay"
else :
    print "You have entered an invalid word!"



#2

For the "NameError" as pointed to on line 1, this is because python2 is used for this course and you are implemeting that of python 3. Use raw_input() instead. Also, check your line 3... :wink:


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.