Hw to stp executing aftr knowing dt it z nt a string


#1



Replace this line with your code.

:`
print "welcome to the Pig Latin translator!"
pyg = 'ay' #end part

original = raw_input('Enter a word:') #to get a name

if len(original) > 0 and original.isalpha():
print original
else:
print 'plz entr a valid input'

word = original.lower()
first = word[0] #tkng fst ltr acrdng 2 da ruls
slice = word[1: ]
output = slice+first+pyg
print "ur output z : "+outputdiscourse.s3.amazonaws.com/original/4X/f/b/5/fb5c4d272e8fb9e25292df5b222fac2e3b7f00b7.PNG" width="690" height="239">
`


#2

@lakshmipandu By the instructions, you are only suppose to translate the variable original only after it has passed the requirements of the if statement, your code did not do that. Make sure to put

Under the if statement. That should fix your problem.


#3

tankoo:slight_smile:


#4

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