Check Yourself... Some More


#1



print 'Welcome to the Pig Latin Translator!'


# Start coding here!
raw_input("John F Kennedy")
original = raw_input("John F Kennedy")

if len("original") > 0 and original.isalpha():
    print "Word"

else:
      print "empty"


#2

I don't know what problem you're having but here are a the key things I notice:

  • You're calling raw_input() twice. Remove the one on the top and leave the original = one.
  • You're testing the length of the string literal "original". Try testing the length of the content of the variable original instead.

#3

ok thx but what do i do with .isalpha() thats the real problem


#4

What does the exercise tell you to do with it?


#5

well finally figured it out should look like this

print 'Welcome to the Pig Latin Translator!'

Start coding here!

original = raw_input("Enter a Word:")
if len("original") > 0 and 1 > 0:
print "Enter a Word:"
else:
print "empty"
original.isalpha()


#6

thx for the help tho man i appreciate it


#7

Hmm, that code does not look correct to me but OK! :slight_smile:


#8

hey it worked so thats what matters XD


#9

Your education is what I am worried about. You should take the time to ensure you are properly grasping what you are doing! :slight_smile:


#10

i completly understan and i trust u that ur absoutly correct when u said it was wrong but the only thing i didnt understan is why when i put letters it dosnt work and numbers do trust i got the rest and understan it but again thx for the help glad that at least u answered my request :slight_smile:


#11

Sounds good. Let us know if you need more help!


#12

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