5. Check Yourself...help please!


#1



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


I don't know what I did wrong in the exercise, and I have tried everything. Thank you for helping me~


print 'Welcome to the Pig Latin Translator!'

# Start coding here!
original = raw_input("Enter a word:")  
    
if raw_input(original) > 0 and original.isalapha(): 
    print original 
    
else: 
    print "empty"


#2

Hi this line

if raw_input(original) > 0 and original.isalapha():

this part

raw_input(original)

instead of it you should put

len(original)

#3

thank you so much! Finally solved my problem.


#4

original = raw_input("Enter a word:")

if raw_input(original) > 0 and original:
print original

else:
print "empty"


#5

if rawinput(original) > 0 and original:_ ?


#6

yes i removed ".isalapha() " and it run perfectly for me!

using .isalapha() shows me a error


#7

Try giving it a input containing a number then. "Test" versus "T3st"
It should give u a error.

".isalapha() " is misspelled and therefor giving the error.

It works without the .isalpha() but when not given as a condition it gives the user the freedom of entering alphanumerical inputs.


#8

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